I have an application that generates a potentially large zip file that can be downloaded to clients using the FileDownloader component.
The zip file is created dynamically, and is stored in a ‘temporary’ directory within the servlet context (ie wherever Tomcat explodes the our vaadin app war to).
The zip file is only needed for this one download. As this can be quite a big file, I would like to delete it immediately following the download completion. Is there any way I can detect this? There is nothing obvious on the FileDownloader object…
For what its worth, my current workaround will be to write to a temp directory unique to the vaadin session, and delete that directory when the session is considered gone…but I would much rather delete the file immediately.