How can I upload multiple images to Retool Storage using the File Dropzone component and associate the upload with the ID of the currently selected row?
Hi @Vinicius_Boaventura_Dias! Let’s assume the bulk upload starts when you click a button.
First, create a JS Query that maps over the values from your File Dropzone component and uploads the images one at a time. You’ll call this query when the upload button is clicked.
The “Upload image” query is a Resource Query to Retool Storage, which receives the additional scope we pass from the JS Query.
What we’re doing is creating a folder for the images, using the ID as the folder name. Later, we can use this same ID to fetch the contents of that folder (the images uploaded for that ID).
IMPORTANT: On your File Dropzone component > Interaction, don’t check ‘Upload file to Retool Storage’ as this will upload the images immediately to Retool and it won’t execute the custom queries that we created (it won’t create the folders).



