>   Does the (temporary!!) files get deleted  automatically? I though that 

> we have to delete it with some additional code.
> Can any one make clear on this.
> 

Yes. On upload, the commons-fileupload library creates temporary files on 
the disk which are deleted on completion of the request. I found three 
mechanisms for deletion in the code - (1) file upload interceptor does an 
explicit deletion of the files on the return path (after 
invocation.invoke() ) (2) the DiskFileItem instances created by 
commons-fileupload has a finalize method that deletes the file and (3) the 
commons-fileupload DiskFileItemFactory has a reference to a reaper thread 
that deletes all unreferenced files. For the last one, I couldn't find the 
code, but it was written so in the comments.
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you


Reply via email to