0

I want to get all images I have saved in my storage folder. There is a way to get the Metadata and the Downloadlink for only one image. But what if I want the download links for all of my images?

My small code so far:

try
{
    FirebaseStorage storage = new FirebaseStorage("*****.appspot.com");
    var info =  await storage.Child("reports").Child($"{public_id}").Child("report_picture_01.png").GetDownloadUrlAsync();
    var starsRef = storage.Child("reports").Child($"{public_id}").Child("report_picture_01.png");
    string link = await starsRef.GetDownloadUrlAsync();
 
    MessageBox.Show(info.ToString());
}

catch (FirebaseStorageException ex) { MessageBox.Show(ex.Message); }

Similar questions:

It exist one possible solution: You rename all your image files with numbers and then you ilerate throught your folder and look if theres any files named like the numbers. But is there a smarter and faster way to solve this problem?

I've tried serveral methods for it and it still doesn't work

burnsi
  • 6,194
  • 13
  • 17
  • 27
Crittts
  • 21
  • 4
  • Have you tried [list all files](https://firebase.google.com/docs/storage/web/list-files) it first then getting downloadURIs through looping on listed objects.check this [link1](https://stackoverflow.com/a/56402109/18265638) & [link2](https://stackoverflow.com/a/73786924/18265638) which might help – Sathi Aiswarya Feb 02 '23 at 08:09
  • I'm using WPF and Visual Studio 22. There are only inofficial libarys which provide a API for Firebase. Unluckly those librarys doesn't provide any "List" or "ListAll" methods :( – Crittts Feb 02 '23 at 09:28

0 Answers0