You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Peter Ertl (JIRA)" <ji...@apache.org> on 2010/11/30 20:02:12 UTC

[jira] Resolved: (WICKET-2833) FileUpload#writeTo copies the stream / a possible rename would be faster

     [ https://issues.apache.org/jira/browse/WICKET-2833?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Peter Ertl resolved WICKET-2833.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 1.5-M4
         Assignee: Peter Ertl

Should be working now: rename first, then, if it doesn't work, copy...

@sebastian: Please test and give feedback :-)

> FileUpload#writeTo copies the stream / a possible rename would be faster
> ------------------------------------------------------------------------
>
>                 Key: WICKET-2833
>                 URL: https://issues.apache.org/jira/browse/WICKET-2833
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket-extensions
>    Affects Versions: 1.4.9
>            Reporter: Sebastian Hinzelmann
>            Assignee: Peter Ertl
>            Priority: Minor
>             Fix For: 1.5-M4
>
>
> I used a FileUploadField as described in the wicket-examples (http://www.wicket-library.com/wicket-examples/upload/single) in my webapplication, in order to realise uploading a file and store this on the server. 
> Furthermore I use the method FileUpload#writeTo(File file). This method is not the fastest solution, if you want to store the file, i think. Why don't you try to rename the file on the system first, before you use Streams.copy.
> There is the interface FileItem. The method FileItem#write(File file) first tries to rename the file. I recognized a great benefit in performance.
> Thats why i don't use the class FileUpload anymore, and receive such a FileItem from the request instead, like:
> final FileItem item = ((IMultipartWebRequest) getRequest()).getFile(fileUploadField.getInputName()); 
> item.write(....

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.