I am having a problem using FileUploadField in wicket 1.4.1.

The code behind this is writing a temporary file to "java.io.tmpdir" (see
getTempFile() in DiskFileItem).

The java hosting service I'm using doesn't grant access to the temp
directory, nor does it allow the changing of system properties, so I get a
security exception whenever I attempt a file upload.

DiskFileItem only uses "java.io.tmpdir" if the repository field is null. I
believe that DiskFileItemFactory is used to create DiskFileItem and set up
it's repository, and a DiskFileItemFactory is created in the constructor for
MultipartServletWebRequest.

So, I need a way of setting the repository, and in
MultipartServletWebRequest there is a comment that says "Configure the
factory here, if desired" (line 96 in version 1.4.1). But, the only way I
can see of configuring the factory so that it has the desired repository is
to edit the code.

Have I missed something? Is there a way of setting the repository without
editing the code? Have I got so deep into the code that I've missed the
obvious! Would the best way forward be to edit the code and request a change
in a future release?

I've had a look at 1.4.8 and it seems to have the same issue.

Thanks for your help,


Mark.
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/wicket-file-upload-tp2230621p2230621.html
Sent from the Wicket - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to