You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Sebastian Hinzelmann (JIRA)" <ji...@apache.org> on 2010/04/13 14:44:48 UTC
[jira] Updated: (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 ]
Sebastian Hinzelmann updated WICKET-2833:
-----------------------------------------
Priority: Minor (was: Major)
> 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
> Affects Versions: 1.4.7
> Reporter: Sebastian Hinzelmann
> Priority: Minor
>
> 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.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira