FileInput Upload Location

Is it possible to determine the folder location when using "Upload file to Retool Storage"

There are a couple of things that I want to accomplish:

  1. My "OCD" is having issues saving the files in the root folder, so having similar files on the same folder is "nicer".
  2. When a user changes the file before submitting or if the application is closed before submitting, the old file stays in the folder. It will be easier to run a query to delete all the files on a specific folder on a regular basis to keep the folder clean instead of having orphan files filling the space.

Thanks


With the code method of using Upload File, there's an option to set folder name.

Thanks @Michael_Huang

Yeah, that was an option I explored but wanted to use the builtin option in order to make sure the user doesn't do anything before the file is loaded as it shows the loading icon... I don't want to need to play with awaiting logic in my app to get the file loaded and handle error/success.

Also the builtin option has the file id in the FileInput object; no need to have anything else...

It would be very useful to have an option to choose the folder

Feedback about choosing folder noted.

Adding event handler for Change would allow skipping user action.

1 Like

Thanks @Michael_Huang . I already changed the logic to have a modal frame for the user to simply select the file so then it can trigger the query to upload the file into the folder I want. Sucks because it is a modal on top of a modal; but it works for now.

Thanks,