Retool Storage - Is this only for Production Environment?

I am just trying out Retool Storage for the first time.

I am developing an app in staging, and added some images to the Storage (via dropping them in the Image component). I can see them listed in the Resources/Storage area, but that only seems to be for the Production environment.

I don't see an option in Resources to create a Storage environment for staging. I see environment options in Database, AI, and Email, but not for Storage or Vectors.

Am I looking in the wrong place, or is this not currently possible?

image

What I want to do was write a query, so the image displayed is dynamic (within a listview) depending on the list item value.

To do that I believe I need to create a resource query of the items in Storage, and reference the results. This is where the error about environments is shown.

After creating the query, the app is then "locked" into Production, as the storage resource doesn't exist in staging. When I delete the query, I can switch back to Staging.

1 Like

+1, I can't find the place to set the staging either.

1 Like

Heads up: Just enabled environment support! Note that environments are not supported in components currently(will be in ~2 weeks), so if you (say) make an upload component store a file in storage, this would always go to production. However, any Retool storage queries respect the environment. You'd have to create the resource in the Retool Storage UI for your environment to start with. Hope this helps!

1 Like

Thank you @himanshu . This definitely works now. Not sure I understand (yet) what will be different in ~2 weeks, but this is perfect for me to get started.

1 Like

Currently, if you use (say) the Image Viewer component > Storage, you'd only be able to select from images on production env even if you switch to staging on your app. More generally, components that have file storage integration (eg image/pdf viewer, uploader components) don't support passing the env. We're working on shipping components with environment support in ~2 weeks.

2 Likes

Thank makes perfect sense. Thank you @himanshu !!

1 Like