• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

Setting max-file-size in Spring-Boot not working as expected  RSS feed

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I my application i need to accept the file to be uploaded by end users. Max allowed size is 5MB, but when i tried to upload exact 5MB file, it's not accepting . Any leads will be helpful

code is below.
application.properties

spring.servlet.multipart.maxFileSize=5MB
spring.servlet.multipart.maxRequestSize=5MB
 
Rancher
Posts: 427
6
Fedora IntelliJ IDE Spring
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does it work if you do 4.9? also what kind of message do you get and where does it come from.
 
Al Hobbs
Rancher
Posts: 427
6
Fedora IntelliJ IDE Spring
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Even though the file size is right, the file plus the rest of the request will be 5MB+.  That might be why.
 
Ullas Sharma
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Al Hobbs wrote:Does it work if you do 4.9? also what kind of message do you get and where does it come from.



Yes it will work below 5MB
 
Power corrupts. Absolute power xxxxxxxxxxxxxxxx is kinda neat.
how do I do my own kindle-like thing - without amazon
https://coderanch.com/t/711421/engineering/kindle-amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!