DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4170>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4170 MaxLengthExceeded doesn't stop file upload Summary: MaxLengthExceeded doesn't stop file upload Product: Struts Version: Nightly Build Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: Other Component: File Upload AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] When I try to upload a file larger than the maximum limit allowed, the "Maximum length exceeded" message doesn't appear on the screen until the entire file is uploaded. In other words, even though the server throws MaxLengthExceededException right away, the browser keeps processing the file. I can't figure out a way to cancel the processing so that the message is displayed right away! This happens within "Struts Framework" as well as outside Struts framework. Detail Description: To see how Struts handles file uploading here's what I am doing; 1) One of the business requirement for my project is that the user is not allowed to attach files larger than a certain limit. 2) To catch this condition I added 'maxFileSize' to web.xml (as described in the attached email). 3) This is when I started getting MaxLengthExceededException and Internal Server Error (as described in the attached email). 4) To resolve this "temporarily", I decided to "play around" with the struts code, so I changed the code to pass the 'MaxLengthExceededException' all the way up to the ActionServlet. I changed the following methods; MultipartIterator Constructor DiskMultipartRequestHanlder.handleRequest() RequestUtils.populate() ActionServlet.processPopulate() ActionServlet.process() 5) This works really well for files of small size. But when I set the maxFileSize to 1Meg and try to upload a 30Meg file the server throws the MaxLengthExceededException right away, but the browser keeps processing the 30Meg file. The "Maximum file limit exceeded" message doesn't show up for about 10 minutes - until the browser is finished processing the file. Is there a way to cancel browser processing right away?