I'm using SpringBoot v.2.3.0.RELEASE
I have a multipart RESTapi and I need to limit the size of the uploaded file.
So, I added these properties into my application.properties file:
spring.servlet.multipart.max-file-size=10MB
spring.servlet.multipart.max-request-size=10MB
This works fine using 10MB limit but, If I change the values from 10MB to 50MB this do not works. In this case I did't receive any errors and the API works fine but, obviously I need to limit this upload.
I noticed that the limits sill works with values less 50MB (for example with 49MB are ok).
Is there some reason? Need I to add some other properties?