Delete Temp WebFile After Download

All files uploaded through my webapp are stored encrypted on the filesystem. These files most likely contain personal and confidential information.
After reviewing the WebFile example project (and YouTube video), I’m left with one question. Does Xojo take care of deleting the temporary (decrypted) file after the download is complete? As I understand it, the Downloaded event is fired once the download is underway and not when the download is complete.

The process I go through when a webapp user requests to download a file is

  1. Decrypt the requested file to a working directory
  2. Set WebFile as the decrypted file in the working directory
  3. Force download of the file

Once the file has been successfully (or unsuccessfully) downloaded, I need to delete the temporary (decrypted) file from the server’s working directory.

Hi Scott, did you find a way?

Delete the reference to the webfile and delete the folder item you used to create the webfile.