Get Supabase signed URL for saved file in bucket

I have successfully uploaded a file to a Supabase bucket using JavaScript. I am storing the file path, including the filename, in the database. When I want to retrieve the file (in a collection), I believe I need to send a “GET” request generating a signedURL. Can someone please tell me how to write the code for that in JavaScript? Or what is the best approach here? (Unfortunately, ChatGPT or similar tools cannot provide further assistance in this matter.)

Hey, if you need to send a GET request, you can use the REST API Plugin that WeWeb Provides :slight_smile: If you could reference the details of the request such as what do the headers need to contain, or a page where the request u gotta do is described, I can try to show you through it :slight_smile:

1 Like

Hey Broberto, thanks for the replay!

A REST API call would indeed be the simplest option for fetching a document with a fixed workflow. However, if I have a collection that needs to dynamically retrieve the respective image from the database, it would probably be easier to use some JavaScript. Or am I thinking in the wrong direction?

The screenshot shows in detail:

Hmm then you’ll need to look into JavaScript fetch requests I think.

2 Likes

Is there a specific way to use Fetch API calls within the Custom Javascript within a global workflow?