6

I am successfully managing to take a photo and upload it to firebase if I have an internet connection. I have also seen that you can set firebase database to persist data when offline but I can't see any documentation on if this is possible with firebase storage.

If this isn't possible what is the best way to approach this if any? Should I save images as base64 then to sharedPreferences? Or as actual files then upload them?

Thanks for any insights

Wazza
  • 1,725
  • 2
  • 17
  • 49
  • There is no built-in support in Cloud Storage for Firebase to keep images on disk. Most folks end up using a library like Glide or Picasso to accomplish this: https://stackoverflow.com/questions/37699688/cache-images-local-from-google-firebase-storage – Frank van Puffelen May 15 '18 at 22:22

1 Answers1

0

Yeah, I had the same problem. Persistence in Firebase Storage in flutter is not working. I don't know why, but this plugin in Dart helps to cache images from the given url for faster loading. Have a look at this plugin.

Mohith7548
  • 1,282
  • 2
  • 16
  • 24