Zaeem
Zaeem

Reputation: 235

How to get all the images from firebase storage in flutter?

Is there a way to get all the images(files) from firebase storage. It doesn't have the listall() function in flutter. If there isn't way to do this, can we get images by their metadata? I don't want to get them by their names.

Upvotes: 0

Views: 268

Answers (1)

Doug Stevenson
Doug Stevenson

Reputation: 317467

Until proper file listing gets added to the API, you don't really have a way to do this from Flutter. Your best options are to:

  1. Build a backend endpoint that can use one of the server SDKs to list objects from Cloud Storage. Query that endpoint from your app.
  2. Make a record in a database for each file, and query the database instead. Make sure to keep the bucket and database in sync.

Upvotes: 2

Related Questions