Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Offline support for Firebase Storage operations #2627

Open
harrisonlo opened this issue Feb 13, 2020 · 4 comments
Open

Offline support for Firebase Storage operations #2627

harrisonlo opened this issue Feb 13, 2020 · 4 comments

Comments

@harrisonlo
Copy link

harrisonlo commented Feb 13, 2020

Describe your environment

  • Firebase Product: Storage

Describe the problem

From my understanding, Firebase Storage does not yet support offline operations. To give some context, I am trying to implement a feature that allows users to "upload" an image in offline mode, which actually just stores to IndexedDB, and uploads when there is internet connection.

Then I thought, isn't this generally how Firestore works? So my question is: are offline operations coming to Firebase Storage? If not, I'd like to make a feature request on it. Also as a personal curiosity question, what is stopping the team from using the same offline logic from Firestore?

Thanks!

@schmidt-sebastian
Copy link
Contributor

@harrisonlo Thanks for reporting this request! Firestore and Firebase Storage are very different under the hood. Firestore is a structured datastore that is meant to store small chunks of interpreted data, where Firebase Storage is a blob storage-based system designed to support much larger files. While offline support for Firebase Storage is certainly an often requested feature, the implementation would likely look very different from the implementation that we use in Firestore and hence these implementations cannot be shared.

Despite the popularity of this request, offline support for Firebase Storage is currently not a feature that is being worked on. We will take your input into consideration as we prioritize future work items. Thank you!

@ccssmnn
Copy link

ccssmnn commented Jan 13, 2022

Have you found a good workaround @harrisonlo?

Wrapping my head around offline functionality as well. Ideally, you would upload an image to storage while storing the reference to it in the Firestore together with other data that belongs to the image.

Maybe a nice workaround would be implementing a fallback, which uploads the image to the Firestore too, when offline. The first request to this image could then upload it to the storage and replacing it with the reference, or you could set up a triggered cloud function to handle this.

@harrisonlo
Copy link
Author

@ccssmnn If the image is small enough to be stored in Firestore, that sounds like a reasonable approach!

@BorisMolch
Copy link

That would be indeed nice to have build in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants