[
https://issues.apache.org/jira/browse/WICKET-2076?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12696976#action_12696976
]
Juergen Donnerstag commented on WICKET-2076:
--------------------------------------------
It is very simple to write to any File you want. Just create the File yourself
and writeTo(File).
public final File writeToTempFile() throws IOException
{
File temp = File.createTempFile(Session.get().getId(),
Files.cleanupFilename(item.getFieldName()));
writeTo(temp);
return temp;
}
I'll provide a patch for the buffer size issue soon. I'll allow you specify the
buffer size as parameter to writeTo(file, bufSize);
> Need a way to programmaticaly configure the location of the temp directory
> for file uploads and the size of the chunk buffer
> ----------------------------------------------------------------------------------------------------------------------------
>
> Key: WICKET-2076
> URL: https://issues.apache.org/jira/browse/WICKET-2076
> Project: Wicket
> Issue Type: Improvement
> Components: wicket
> Affects Versions: 1.3.5
> Reporter: Alex
>
> When using FileUploadField there is no way to configure where the temporary
> file is created. The only way to pass it to the lower levels is to use the
> System.property.
> Also there is no way to configure the size of the memory buffer used to
> receive the data. It's currently hardcoded to be 4K which is too small in
> some applications (slow file writes). I'd like to be able to bump that up to
> 128K.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.