Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

post request upload file in azure,but appear 411 #2493

Open
YLIU356Volvocars opened this issue Jul 31, 2024 · 1 comment
Open

post request upload file in azure,but appear 411 #2493

YLIU356Volvocars opened this issue Jul 31, 2024 · 1 comment
Labels
feedback provided Feedback has been provided to the author

Comments

@YLIU356Volvocars
Copy link

YLIU356Volvocars commented Jul 31, 2024

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?

@kdavisk6
Copy link
Member

HTTP error code 411 indicates that a file length is required and either not present or incorrect. https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/411

I recommend looking into that status code first.

@kdavisk6 kdavisk6 added the feedback provided Feedback has been provided to the author label Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feedback provided Feedback has been provided to the author
Projects
None yet
Development

No branches or pull requests

2 participants