[SOLVED]How to show multiple images all at once in respective to storage image id stored in database
- 0
- Databases
- Storage
How can i show all the images that I have stored in Storage bucket -> id linked to the database table?
How to show multiple images all at once in respective to storage image id stored in database?
You mean, you have an list of IDs of images, and you want to display all of them?
I have list of products where i have image id as an attribute to store the image id. Now i need to show all the products along with the respective images getting from storage bucket
For the products you'll probably use the listDocuments function run a loop all over them.
As for each image are you using cloud or self hosted? If you're using the cloud then you can use a URL like this https://cloud.appwrite.io/v1/storage/buckets/B_ID/files/F_ID/preview?project=P_ID
When:
B_ID = Bucket ID
F_ID = File ID
P_ID = Project ID
Inside an image src attribute
<img src="https://cloud.appwrite.io/v1/storage/buckets/B_ID/files/F_ID/preview?project=P_ID" >
If you're using a self hosted just replace cloud.appwrite.io with your Appwrite endpoint.
Is this make sense?
Thank you so much <:appwriterocket:823996226894692403>
[SOLVED]How to show multiple images all at once in respective to storage image id stored in database
Recommended threads
- Invalid query: Attribute not found in sc...
Hiya. I'm trying to use the REST API with documents and doing a simple select with query: https://<mydomain>/v1/databases/<database>/collections/<collection>/d...
- One org lost all data out of 13 org's af...
> https://<domain>/v1/storage/buckets?queries%5B0%5D=%7B%22method%22%3A%22limit%22%2C%22values%22%3A%5B6%5D%7D&queries%5B1%5D=%7B%22method%22%3A%22offset%22%2C%...
- Failed to load data from database
My app broken, it throw AppwriteException exception. Few days ago it works well. AppwriteException: , ClientException with SocketException: Failed host lookup:...