Rafal Krzewski wrote:
> 
> Neeme Praks wrote:
> > Can we also get the temporary filename (or handle) of the file uploaded
> > (if stored on disk)? For example, I need to move the file to a different
> > location on the same machine and it would be much simpler to move it
> > instead of reading and writing the stream.
> 
> I see your point. If the old and new location reside within the same
> physical volume, implementation of File.renameTo() would probably be
> able to just modify directories, instead of shuffling whole contents
> of the file around.
> This functionality is sure easy to add, but in my opinion it breaks the picture.
> Temporary files should be invisible to the aplication, and not tampered with.
> Some FileItems don't have a temp file, so you would have to implement read-write
> model anyway.

I've implemented this in Joist <http://joist.tigris.org/> using the
O'Reilly servlet package.  There is currently no way around writing the
data to disk then renaming the file (using this library).  If you'd like
to check it out, the classes are FileUpload and RenameableFileUpload in
the org.joist.util package.
-- 

Daniel Rall <[EMAIL PROTECTED]>
http://collab.net/ | open source | do the right thing


------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to