https://supabase.com/ logo
If i have a list a product of things with image ur...
# help
r
If i have a list a product of things with image url that was store in storage i have to find a way to call ``await supabase.storage.from('image').download(path)`` every time and create a ``URL.createObjectURL(data)`` or their is a way to upload the image and when it fetch and pass to `` it read like other api do.
n
Hello @React noob! This thread has been automatically created from your message in #843999948717555735 a few seconds ago. We have already mentioned the @User so that they can see your message and help you as soon as possible! Want to unsubscribe from this thread? Right-click the thread in Discord (or use the ``...`` menu) and select "Leave Thread" to unsubscribe from future updates. Want to change the title? Use the ``/title`` command! We have solved your problem? Click the button below to archive it.
g
Not sure exactly what you are asking but there are calls to get a public URL for a public bucket or to get a signed URL (time expiring token) for private buckets.
r
I want to know if we can get a readable url directly to avoid going through supabase.storage.from('image).whatever you call to get the image url. Because I have no idea how I can pass each url into that function before it goes into the image tag. (Because I'm trying to render a list of items)
g
If it is a public bucket you can generate the url with constants or call https://supabase.com/docs/reference/javascript/storage-from-getpublicurl which DOES NOT make a database call as the url is known based on your instance url, the bucket name and the filename. You can also save this url in a table. If private then you must use https://supabase.com/docs/reference/javascript/storage-from-createsignedurl or https://supabase.com/docs/reference/javascript/storage-from-createsignedurls which does make a storage call. You can set those url's to expire in days, weeks or even possibly years, but in general you have to regenerate them when you are going to need them.
r
`` You can also save this url in a table.`` how can we automate this process should i automate this in the client side ?
n
Thread was archived by @React noob. Anyone can send a message to unarchive it.