Back

Get URLs of all files in a storage bucket

  • 0
  • Self Hosted
  • Flutter
  • Android
  • Storage
AleXoTroN
16 Jan, 2024, 14:25

i have made a wallpaper application that should now work with appwrite instead of firebase

so: i want to get all files of a storage bucket and i also need a url of every file which can be used to directly access the image.

I dont want to do it with jwt because my app will just use the anonymous authentication method. How can i realize that?

currently i am just able to get all file objects but the "File" model does not include a url

TL;DR
Developers are asking how to get URLs for all files in a storage bucket using anonymous authentication. They have mentioned that they are able to get all file objects, but the "File" model does not include a URL. They want to create URLs that can be used to directly access the images.
Kenny
16 Jan, 2024, 14:29

I believe it should return the bucketId and $id among other attributes, you can use these to create the link yourself. The link is in this format: https://cloud.appwrite.io/v1/storage/buckets/BUCKET_ID/files/FILE_ID/view?project=PROJECT_ID

Kenny
16 Jan, 2024, 14:32

Even if someone is authenticating anonymously you'd still need to pass through the jwt, and in your bucket you'd have to set permissions to be something like this.

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more