|
[
Permlink
| « Hide
]
Martin Cooper added a comment - 30/Oct/05 04:21 AM
This was fixed some time ago in 1.1-dev.
I could not find any release related to this change in fileupload.
Apart from possible changes, a streaming API was added in 1.2. If you are sensitive for memory considerations, this is the way to go anyways.
Since I am using Struts v1.1, when even there is multipart/form-data request, it use fileupload v1.0. I am not sure if I put fileupload v1.2 together with Struts v1.1, will they work.
I notice the code in fileupload v1.2 has changed FileUploadBase to use streaming, but will it save some memory for form fields in the case mentioned in this issue? I see absolutely no reason, why we should still support 1.1. This applies, in particular, to memory considerations and stuff like that. The streaming API was invented exactly for that purpose.
It looks like that fileupload v1.2 plus io v1.31 should solve the problem.
Attached is the zip file containing a sample application using commons file upload. The lib directory contains a jar file named "commons-fileupload-ext.jar" resolves the out of memory problem. The new version of FileItem treats the plain text form parameters and multipart parameter in different ways. The newer version uses StringBuffer for the plain text parameters. This FileItem also supports ajax based monitoring of the file upload.
Along with this the jar provides a base servlet class which does the file uploading. The user needs to extend this class to add just business logic such as implementing validation, process the uploaded file etc.
I'm using the jar which are given in above zip.When i'm trying to run the same application in struts2 its giving problem for small file upload.
If file size is small it not uploading. Please don't use this bug tracker for support requests. Your best bet seems to be the Struts users mailing list.
Apart from that, your problem might be related to |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||