OpenFeign / OpenFeign/feign

post request upload file in azure,but appear 411

Open
#2,493 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feedback provided
Dominant language
Java
Stars
9.8k
Forks
1.9k
Avg merge
1d 2h
Merged PRs (30d)
41

Description

I have a request from the client to the service,this is post request upload file in azure ,but occurred 411,the following message appears:

feign.FeignException$FeignClientException: status 411 reading FileServiceClient#handleFileUpload(MultipartFile)
	at feign.FeignException.clientErrorStatus(FeignException.java:181)
	at feign.FeignException.errorStatus(FeignException.java:141)
	at feign.FeignException.errorStatus(FeignException.java:133)
	at feign.codec.ErrorDecoder$Default.decode(ErrorDecoder.java:92)
	at feign.SynchronousMethodHandler.executeAndDecode(SynchronousMethodHandler.java:151)
	at feign.SynchronousMethodHandler.invoke(SynchronousMethodHandler.java:80)
	at feign.ReflectiveFeign$FeignInvocationHandler.invoke(ReflectiveFeign.java:103)
	at com.sun.proxy.$Proxy209.handleFileUpload(Unknown Source)
	at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:769)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:747)
	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:366)
	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:99)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:747)
	at org.springframework.aop.interceptor.AsyncExecutionInterceptor.lambda$invoke$0(AsyncExecutionInterceptor.java:115)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

client:
      @PostMapping(value = "/azure/blob/uploadFile", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
      RestResultResponse<FileUploadVO> handleFileUpload(@RequestParam("multipartFile") MultipartFile multipartFile);

service:
     @PostMapping(value = "/uploadFile")
    public ResponseDTO<FileUploadVO> uploadFileFegin(@RequestParam("multipartFile") MultipartFile multipartFile) {
        return  ResponseUtils.success(azureBlobUtil.upload(multipartFile));
    }

Can help me give me some suggest or idea improve it?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Feign client method handleFileUpload and the service uploadFileFegin mapping shown in the issue, then inspect the multipart request sent to Azure and the source of the 411 response. Reproduce the upload with the provided mappings and determine whether the failure is in Feign, the service endpoint, or Azure; done requires a confirmed cause and a documented resolution.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.