DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=24306>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=24306 Fileupload fails for forms with a large number of inputs ------- Additional Comments From [EMAIL PROTECTED] 2004-10-08 10:41 ------- I encountered this problem, too. My form contained about 15 form fields and 5 file upload fields. My threshold was 1 MB and so I wasted about 20 MB. Simple workaround: I subclassed DefaultFileItemFactory and added a property "sizeThresholdFormField". In "createItem" I created a default FileItem if "isFormField" was false. For form fields I created a FileItem with a threshold of "sizeThresholdFormField". So the waste of memory was much lower for form fields. On the other hand: if a textarea contains a lot of text it could be stored in a file, which is a loss of performance. Usage: DiskFileUpload fileUpload = new DiskFileUpload (new HDFileItemFactory(1*1024 *1024, 1024, repository) ); This created a FileUpload with thresholds of 1 MB for files and 1 KB for form fields. In the above sample I would need 5 MB + some KB instead of 20 MB. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
