Back

[SOLVED] Fetch multiple images from storage?

  • 0
  • Web
  • Storage
  • Cloud
Chola
8 Jun, 2023, 19:21

I have an array of ID's that correspond to images in the bucket storage. Is there a way to pull all those images at once or must i make a getFilePreview() request for each photo? I'm displaying these photos in a list view so would be sweet to pull all images at once

TL;DR
Solution: To fetch multiple images from storage, you have a couple of options: 1. Make multiple API calls: You can pass the file ID of each image into separate widgets and concurrently fetch the data. This way, each widget can fetch the image data simultaneously. However, this method may result in slower performance if you have a large number of images. 2. Use a network image widget/helper: Another option is to pass the URL of each image into a network image widget/helper. This approach allows you to fetch and display the images directly from their URLs without making separate API calls. Choose the method that suits your needs and implementation.
Chola
8 Jun, 2023, 19:51

Fetch multiple images from storage?

Drake
9 Jun, 2023, 00:56

regardless, you need to make multiple api calls...so you can pass the file ID into each of the widgets and have each widget concurrently fetch the data.

Alternatively, you can pass the URL into the network image widget/helper

Chola
15 Jun, 2023, 19:35

[SOLVED] Fetch multiple images from storage?

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