Closed yannalam closed 8 years ago
I have tested it and I haven't found a case that files had not been deleted. It will be deleted on streamingFinished event when the file has successfully uploaded and the UploadFinishedHandler.handleFile function returned or on streamingFailed event when the user cancels the upload or upload was interrupted for some reason. There is a DefaultUploadReceiver which handles the streaming of files being uploaded but you can optionally replace it with another custom UploadReceiver implementation at the UploadStatePanel constructor.
Hi Gergely
I am sorry for late reply, let me test once again to find out whether files are getting deleted and thank you for suggestion for writing custom UploadReceiver, I will try this.
To be honest, it works great. Thank You for providing the addon
Thanks Malla Reddy
On Thu, Mar 27, 2014 at 8:48 PM, Gergely Juhász notifications@github.comwrote:
I have tested it and I haven't found a case that files had not been deleted. It will be deleted on streamingFinished event when the file has successfully uploaded and the UploadFinishedHandler.handleFile function returned or on streamingFailed event when the user cancels the upload or upload was interrupted for some reason. There is a DefaultUploadReceiver which handles the streaming of files being uploaded but you can optionally replace it with another custom UploadReceiver implementation at the UploadStatePanel constructor.
— Reply to this email directly or view it on GitHubhttps://github.com/wbstr/vaadin-multifileupload/issues/11#issuecomment-38817083 .
Hi,
I was experiencing the same problem in our application. I found out that in our case the problem was our UploadHandler
implementation did not close the InputStream given in:
public void handleFile(InputStream, String, String, long)
You could consider some ways to mitigate that risk in the future:
DefaultUploadReceiver.deleteTempFile()
:
Thanks for the contribution! Andi Maybe you should point out
Fixed in 1.9.
Hi The files which are uploaded to the Temp Directory location are not getting deleted. It would be great if there is a Handler which returns the File object.
Thanks