Issue Details (XML | Word | Printable)

Key: FILEUPLOAD-86
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Unassigned
Reporter: Kevin Minshull
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Commons FileUpload

File upload exceptions.

Created: 16/Feb/03 10:14 AM   Updated: 09/Mar/07 08:32 PM
Return to search
Component/s: None
Affects Version/s: 1.0 Alpha
Fix Version/s: None

Time Tracking:
Not Specified

Environment:
Operating System: All
Platform: All

Bugzilla Id: 17106


 Description  « Hide
I have been using the file upload for handling my requests and i quite like
what there is so far. The reason that i chose this over the servlets.com file
upload is because this is able to handle the file too large with an exception.
I am actively using it in the development of my website and in the testing and
development it works just as good as the servlets.com file upload so far. I
have not yet stressed it though.

However i would like to suggest to take one more step. I suggest you throw the
usual FileUploadException when "the request was rejected because it's size
exceeds the allowed range" and throwing something to the effect of a
FileUploadRequestException as "the request doesn't contain a multipart/form-
data..."

This is the reason that i chose the product, and am continuing to use it, but i
wish there was a more defined way to know about the size exception instead of
doing a string check on the exception message.

Thx for your time to read this.



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Martin Cooper added a comment - 03/Mar/03 02:27 PM
Fixed in the 20030303 nightly build.

I added three new, more specific, exception types:

  • FileUpload.InvalidContentTypeException
  • FileUpload.UnknownSizeException
  • FileUpload.SizeLimitExceededException

These all extend FileUploadException for convenience.