Retrieving multiple items from Supabase storage

Hi everyone!

The updated Supabase plugin for Weweb is awesome, one of the reasons being that we can now generate signed URLs for non-public storage items without having to write custom JS.

I have a use case where, when a certain “table row detail” page is loaded, I would like to batch generate signed URLs for all the storage objects that are associated with that particular table row so I can display them. The storage bucket is structured accordingly. The first path token represents what group the row item belongs to, the second path token matches the row item, then there’s a third path token that’s a randomly generated UUID, and finally the fourth token is the filename.

My question is this: how can I get all the matching filepaths to feed into my “create multiple signed URLs” workflow action? I.e. all the objects from my storage bucket where the full path matches “groupID/rowID/wildcard”? I tried the AI assistant to generate some JS code to do this, without success.

An “easy” solution I can think of would be to create a junction table to match row items with their storage objects with full path, but I feel like that shouldn’t be necessary given how I’ve organized the bucket folder structure.

Any ideas? Thanks!

Hi @gduteaud :wave:

Not 100% sure I understand your use case. Could you maybe share a couple of screenshots to help us visualize how things are setup?

One “easy” solution that might not be relevant at all :sweat_smile:: did you try a for loop action in a workflow?