ReTool Storage / File Upload / Orphaned Uploads

I am trying to solve the issue of Orphaned Uploads. Let's use the FileDropzone component for my example. I have a form, with fields, and then I want the user to be able to add a few documents with the submission. We add the filedropper, and tick the box for "Upload file to Retool Storage"

This works, we drop demo.txt and see it in ReTool storage. What happens now when, oops, the user picked the wrong file. They click clear, and drop a different file. Now the first file is orphaned! Clear did not remove the upload, so now what do we do with that file? Are we supposed to be keeping our own, in-app list of temp uploads and have an additional query to remove uploads?

Or maybe I thought that using another query, we could move the uploads to a folder, but there is no action for move
image

I was hoping for a more intuitive way to manage the files in ReTool storage, and if there is a better way, I would love to hear from the community.

1 Like