You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by jonathan MERCIER <jo...@gmail.com> on 2010/05/04 19:08:04 UTC

[fileupload] problem with big file in servletFileUpload.parseRequest(request)

hello, i have a problem with file upload and bigfile
i have set server xml as:
________________________________________________________________
...
<Connector port="8009" protocol="AJP/1.3" maxPostSize ="104857600"
redirectPort="8443" />
...
<Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000"
maxPostSize ="104857600" redirectPort="8443" />
...
_________________________________________________________________

java code :
_________________________________________________________________
...
servletFileUpload.setSizeMax(-1);
servletFileUpload.setFileSizeMax(-1);

List fileItems  = servletFileUpload.parseRequest(request);
Iterator itr    = fileItems.iterator();

while (itr.hasNext())
{
...
}
...
_________________________________________________________________

with big file (10Mo) i enter never in while loop!!!!

thanks for help




---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Re: [fileupload] problem with big file in servletFileUpload.parseRequest(request)

Posted by jonathan MERCIER <jo...@gmail.com>.
More information
here a complete java code: http://fpaste.org/Ekww/ expire in one day
with smaller file around 20Kio works fine i have try with abig file
around 10Mio and i have this personnal error:
________________________________________________________________
Error in ACoMGlobalResults ==>
java.io.FileNotFoundException: /tmp/F3F6DE2527E3C44E3F9FF0E7B0831C74/upload__39e04a7a_12865a04911__7ffb_00000007.tmp (No such file or directory) Message: Processing of multipart/form-data request failed. /tmp/F3F6DE2527E3C44E3F9FF0E7B0831C74/upload__39e04a7a_12865a04911__7ffb_00000007.tmp (No such file or directory) Trace: [Ljava.lang.StackTraceElement;@4a93837b
________________________________________________________________

Why this code work only for small file?!

thanks for any help





---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Re: [fileupload] problem with big file in servletFileUpload.parseRequest(request)

Posted by jonathan MERCIER <jo...@gmail.com>.
sorry for inconvenience, i have fix my problem.
it is because when file is greater than 50 kio temporary file need be
write in directory who exist.

thanks


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org