# Get Supabase signed URL for saved file in bucket

**URL:** <https://community.weweb.io/t/get-supabase-signed-url-for-saved-file-in-bucket/3122>\
**Category:** How do I?\
**Tags:** supabase\
**Created:** [June 19, 2023, 5:19pm UTC](https://community.weweb.io/t/get-supabase-signed-url-for-saved-file-in-bucket/3122 "2023-06-19T17:19:30Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![tillyboard](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/tillyboard/32/3317_2.png) [@tillyboard](https://community.weweb.io/u/tillyboard)\
**Post date:** [June 19, 2023, 5:19pm UTC](https://community.weweb.io/t/get-supabase-signed-url-for-saved-file-in-bucket/3122/1 "2023-06-19T17:19:30Z")

</div>

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.)

---

<div class="post-metadata">

**Author:** ![Broberto](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/broberto/32/5918_2.png) [@Broberto](https://community.weweb.io/u/Broberto)\
**Post date:** [June 19, 2023, 5:57pm UTC](https://community.weweb.io/t/get-supabase-signed-url-for-saved-file-in-bucket/3122/2 "2023-06-19T17:57:34Z")

</div>

Hey, if you need to send a GET request, you can use the REST API Plugin that WeWeb Provides 🙂 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 🙂

---

<div class="post-metadata">

**Author:** ![tillyboard](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/tillyboard/32/3317_2.png) [@tillyboard](https://community.weweb.io/u/tillyboard)\
**Post date:** [June 19, 2023, 7:45pm UTC](https://community.weweb.io/t/get-supabase-signed-url-for-saved-file-in-bucket/3122/3 "2023-06-19T19:45:57Z")

</div>

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:

 ![Bildschirm­foto 2023-06-19 um 21.41.19](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/5/521d9a236412032448438fe5ae451ed9a6564e65.png)

---

<div class="post-metadata">

**Author:** ![Broberto](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/broberto/32/5918_2.png) [@Broberto](https://community.weweb.io/u/Broberto)\
**Post date:** [June 19, 2023, 7:53pm UTC](https://community.weweb.io/t/get-supabase-signed-url-for-saved-file-in-bucket/3122/4 "2023-06-19T19:53:21Z")

</div>

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

> **[Using the Fetch API - Web APIs | MDN](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch)**
>
> The Fetch API provides a JavaScript interface for accessing and manipulating parts of the protocol, such as requests and responses. It also provides a global fetch() method that provides an easy, logical way to fetch resources asynchronously across...

---

<div class="post-metadata">

**Author:** ![imb](https://avatars.discourse-cdn.com/v4/letter/i/ecd19e/32.png) [@imb](https://community.weweb.io/u/imb)\
**Post date:** [March 7, 2024, 2:00am UTC](https://community.weweb.io/t/get-supabase-signed-url-for-saved-file-in-bucket/3122/5 "2024-03-07T02:00:15Z")

</div>

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