We upgraded to spring boot 3.1.10, we have a file upload functionality
uploadFile(@RequestPart(value = “file”) MultipartFile file)
It works in local, but on production server
2024-06-28 03:22:31 [::](http-nio-8080-exec-4) WARN org.apache.catalina.connector.Request.log: Creating the temporary upload location [/work/Tomcat/localhost/ROOT] as it is required by the servlet [dispatcherServlet]
2024-06-28 03:22:31 [::](http-nio-8080-exec-4) WARN org.apache.catalina.connector.Request.log: Failed to create the upload location [/work/Tomcat/localhost/ROOT]
2024-06-28 03:22:31 [::](http-nio-8080-exec-4) ERROR org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/].[dispatcherServlet].log: Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed: org.springframework.web.multipart.MultipartException: Failed to parse multipart servlet request] with root cause
java.io.IOException: The temporary upload location [/work/Tomcat/localhost/ROOT] is not valid
at org.apache.catalina.connector.Request.parseParts(Request.java:2754)
at org.apache.catalina.connecto
Tried with @RequestParam, it fails with same error.
Hemanth K N is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.