On 01/25/2013 12:18 PM, [email protected] wrote:
I have a JSF application which runs in JBoss 6.1 which uses internal the
Tomcat Servlet container.
I want to prevent too large file uploads and have set the property "
fileSizeMax" to 10MB within the class "FileUploadBase". It works, the file
upload throws an FileSizeLimitExceededException for all files larger than
10MB.
But the main problem is, that the whole file will be transferred over the
network. I have found this out by checking the network traffic.

How can I interrupt the file transfer when the max size is exceeded
without transferring the whole file? I assume that the file will be
transferred in multiple packages because of the web form attribute enctype
="multipart/form-data.

Did you try to set the option sizeMax (FileUploadBase#setSizeMax) instead of fileSizeMax. sizeMax sets an upper limit on the request size.

Kind regards,

Martijn Brinkers


--
DJIGZO email encryption

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to