0

I am currently storing urls to images in my firebase database, but retrieving these slows down the front end. I would like to move them to firebase storage without having to manually download and upload them.

Is this possible? And how would it be done. Thanks

  • Have a look here: https://stackoverflow.com/questions/40581930/how-to-upload-an-image-to-firebase-storage/40581958 – MandyShaw Jul 29 '18 at 21:50
  • Could you tell us what *slows down the front end* means? Retrieving a list of 5000 text based urls from Firebase Database should be almost instantaneous. If you want to move the actual images from one place to another per @frankvanpuffelen answer, where are they being moved from and to? Do you have any code you can provide so we can take a look? Please review [How to create a Minimal, Complete, and Verifiable example](https://stackoverflow.com/help/mcve) – Jay Jul 30 '18 at 17:38

1 Answers1

0

What you want is totally possible, but not without you writing the code for it. There is no built in "take the list of URLs from the database, and add them to Cloud Storage" API built into Firebase.

But it's a fairly straightforward three-step process:

  1. Read the image URLs from your database.

  2. For each URL:

    2.1 Read the binary data from that URL.

    2.2 Use the Firebase SDK to write them to Cloud Storage.

If you get stuck along the way, share the minimal code that reproduces where you got stuck.

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807