File upload limit on api

Hi,

I have been trying to upload a file using the rest API on my jmix app of version 1.5.1, my app is supposed to handle large file sizes but I have been getting the following errors when I upload a file

Caused by: org.springframework.web.multipart.MaxUploadSizeExceededException: Maximum upload size of 20971520 bytes exceeded; nested exception is org.apache.commons.fileupload.FileUploadBase$SizeLimitExceededException: the request was rejected because its size (47855356) exceeds the configured maximum (20971520)

Caused by: org.apache.commons.fileupload.FileUploadBase$SizeLimitExceededException: the request was rejected because its size (47855356) exceeds the configured maximum (20971520)

I have added the following to my app.properties but still the same issue

spring.servlet.multipart.max-file-size=1000MB
spring.servlet.multipart.max-request-size=1000MB
server.tomcat.max-swallow-size=1000MB

please I really need help resolving this issue.

hi @paakofiaidoo17 ,
If I understand you correctly, you use the REST API.
So I’m wondering if you set / modified the application property
jmix.rest.max-upload-size.

Please see the documenation for that:
https://docs.jmix.io/jmix/rest/app-properties.html#jmix.rest.max-upload-size

BR
Stefan

1 Like