Hi, I have a question regarding to storage service...
# help
b
Hi, I have a question regarding to storage service. Does this service provide a public url that i can use in my app? @User
n
Hello @Bartek! This thread has been automatically created from your message in #843999948717555735 a ``few seconds ago``. Pinging @User so that they see this as well! 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
Yes if you declare the bucket public. https://supabase.com/docs/guides/storage#accessing-objects Otherwise you can get a url with a timed token for private buckets.
n
Bartek (2022-04-01)
b
Thank you.
I don't know if I got it right from documenation. Are all files automatically seved in sql?
g
No, if you are using hosted Supabase the files are stored in s3. There are object tables though in the database for doing security policies and such which point to the files in storage. These get created when you upload.
b
I'm asking because I'd like to try your storage service. I have an application where users can save their files and can see them back in their dashboard.
Whether each of the saved files has its own unique URL
g
Not sure what you are further asking? You can store the files in separate directories for each user how ever you like. You define the path to the file how you like. You can also have security by user on those paths. If you choose to have a public bucket each file has a url to it that anyone can use to "read" it.
b
Thank you for your answer. I have one more question regarding this piece of code. What does object data return.
Copy code
js
const { data, error } = await supabase
    .storage
    .from('avatars')
    .download('space-cat.png')
Do you plan to add a nosql in the future?
@User
g
That request should download a file to the client. Edit I see you mean the actual data object. Not sure without checking. I'm a user, I don't know about long term plans.
b
Thank you. I really appreciate your reply.
3 Views