I\'ve got a fairly simple Spring Boot web application, I have a single HTML page with a form with enctype=\"multipart/form-data\". I\'m getting this error:
from documentation: https://spring.io/guides/gs/uploading-files/
Tuning file upload limits
When configuring file uploads, it is often useful to set limits on the size of files. Imagine trying to handle a 5GB file upload! With Spring Boot, we can tune its auto-configured MultipartConfigElement with some property settings.
Add the following properties to your existing
src/main/resources/application.properties:
spring.http.multipart.max-file-size=128KB
spring.http.multipart.max-request-size=128KBThe multipart settings are constrained as follows:
spring.http.multipart.max-file-size is set to 128KB, meaning total file size cannot exceed 128KB.
spring.http.multipart.max-request-sizeis set to 128KB, meaning total request size for a multipart/form-data cannot exceed 128KB.