This week's book giveaway is in the HTML, CSS and JavaScript forum.
We're giving away four copies of hapi.js in Action and have Matt Harrison on-line!
See this thread for details.
Win a copy of hapi.js in Action this week in the HTML, CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Limiting File Size Upload

 
Steve Dyke
Ranch Hand
Posts: 1710
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using the sommons-fileupload-1.2 jar

This is my code but a file with size of 889KB still gets uploaded.

Upload file size limit is set to .01 in my application settings.

 
Tim Moores
Bartender
Posts: 3195
54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What *actual value* are you setting in the setFileSizeMax call? You might want to print it out, since the use of the config object -whatever that is- is a bit confusing.

As an aside, you might want to switch to the current version of the upload library; 1.2 is rather dated.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!