Ability to Reset S3 Uploader Objects

I am currently working on some controls for when users can submit a form. Part of this validation is making sure they have uploaded the relevant documents, which works for the first form submission, however, I can't seem to find a way to "reset" the object's last file uploaded after they have ran the relevant queries. This results in the next use of that form to show a file already having been uploaded. Would it be possible to use a javascript query that I can put as an on success trigger, that would either set this value to an empty string, or reset the whole object to default?

Hi @ksink7. Thanks for the feature request!

Currently, I think the best workaround here would actually be to use the File Button component, and then use that file in a query to S3, rather than using the S3 uploader component. The File Button component has a .clearValue function which you could then use to clear it out after uploading a file.

I'll share this feature request internally as well :slightly_smiling_face:

I will give that solution a try. I also found another workaround, while still using the S3 Uploader. I created a new text input to hold the value of the S3 uploader, which gets set when there is a successful upload by another JS query. Then when the relevant query runs, it triggers another JS query that then resets the text input to an empty string.