Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Java

Ronald Williams
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Ronald Williams
Java Web Development Techdegree Graduate 25,021 Points

How do you change the file upload size limit?

I see the link in the teacher's notes. For the Spring Guide. It says to add the following properties:

spring.http.multipart.max-file-size=128KB

spring.http.multipart.max-request-size=128KB

I added these to app.properties and I have tried changing the numbers from 128kb but no luck. Most gifs I find are 2mb - 5mb. Any ideas on how to adjust the file size upload limit?

1 Answer

Nivard Rikken
Nivard Rikken
5,377 Points

I got it working by adding application.properties file to the resources folder and adding the following configuration:

multipart.maxFileSize=10MB
multipart.maxRequestSize=-1

screenshot