You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by Ben Peter <bp...@zentropypartners.com> on 2002/04/13 04:16:49 UTC

[PATCH] sync t2 FileItem.write() with commons-fileupload DefaultFileItem

Hi,

the DefaultFileItem in commons-fileupload has handling for a problematic 
situation where calling renameTo() on the uploaded file fails although it is 
entirely possible to move the file manually.

The FileItem in t2 lacks this code.

The attached patch adds the mentioned code to t2's FileItem (So this is really 
  a copy/paste/compile/see-if-it-works as a patch for your convenience if you 
want to include it in t2 for those who haven't switched to decoupled fulcrum).

Cheers,
Ben

-- 
Benjamin Peter                                          +49-69-96244395
Application Engineer                             Moerfelder Landstr. 55
(zentropy:partners)                            60598 Frankfurt, Germany

Re: [PATCH] sync t2 FileItem.write() with commons-fileupload DefaultFileItem

Posted by John McNally <jm...@collab.net>.
Patch applied.  There have been a couple other changes to the
DefaultFileItem, if you care to provide a backported patch for those as
well.  I will apply them.

I think one of them can be worked around by setting the threshold to 0
or not uploading binary files.  The other one just makes sure to clean
up the temporary files on jvm exit.

john mcnally

Ben Peter wrote:
> 
> Hi,
> 
> the DefaultFileItem in commons-fileupload has handling for a problematic
> situation where calling renameTo() on the uploaded file fails although it is
> entirely possible to move the file manually.
> 
> The FileItem in t2 lacks this code.
> 
> The attached patch adds the mentioned code to t2's FileItem (So this is really
>   a copy/paste/compile/see-if-it-works as a patch for your convenience if you
> want to include it in t2 for those who haven't switched to decoupled fulcrum).
> 
> Cheers,
> Ben
>

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>