commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Rose <ch...@microserf.org.uk>
Subject Re: [FileUpload] Large file uploads are slow
Date Sat, 11 Mar 2006 09:39:22 GMT
Hi again

>> I am using a DiskFileItemFactory, and the only thing I do to it is
>> mandate that the ServletFileUpload object created by the factory does
>> not have a limit on the size of the file being uploaded. The  
>> transfer is
>> going via HTTPS.
>
> I'm a little confused by this.

[Snip]

Sorry---it was a Friday and I was tired; here's a snippet:


                 DiskFileItemFactory factory = new DiskFileItemFactory 
();
                 ServletFileUpload upload = new ServletFileUpload 
(factory);
                 upload.setSizeMax(-1); // No maximum upload size.
                 List fileItems = upload.parseRequest(request);

Then later I write the uploaded data to disk using fileItem.write 
(File). As I said in my original email, it's parseRequest() that  
takes a long time.

> Second, an unlimited file size is the default, so you
> shouldn't be configuring anything if that's what you want.

I added that code in case the default changes at a later date and to  
make it explicit in the code that there is no maximum file size.

So, is it possible to make an upload go faster? 20 seconds is an  
awfully long time...

Thanks again,

C

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


Mime
View raw message