Firebase Storage retry

229 views
Skip to first unread message

Alexnaldo Santos

unread,
May 22, 2016, 8:37:11 PM5/22/16
to Firebase Google Group
Hi Guys,

I will be using Firebase iOS SDK to save video and image with the Firebase Storage.

I would like to know if the automatic retry option of Storage SDK retry even after App restart or only for running App?

Regards,
Alexnaldo Santos

Mike Mcdonald

unread,
May 23, 2016, 11:14:56 AM5/23/16
to Firebase Google Group
Hi Alexnaldo,

Thanks for reaching out, that's a good question. Currently the uploads retry only while the application is in the foreground, but we're working on adding persistent background/out of process uploads so that even if your app is backgrounded (or restarts), the uploads will retry. How are you planning on using this feature?

Thanks,
--Mike

Alexnaldo Santos

unread,
May 25, 2016, 5:15:05 PM5/25/16
to Firebase Google Group
Hi Mike,

Currently I'm using FB to save data to my App. FB have a great feature of sync data automatic, so I need only to "setValue" and anything will be sync as soon as possible.

Now, sometime we need to save data and image/video at the same time. As you know, Storage and Database isn't the same instance, so we need to save data only after uploaded image/video to maintain its synchronized (i.e. my FEED must have the correct link for image/video )

Will be great if both (Database and Storage) works together in sync like a "unit transaction".

Like it:

let localFile = NSURL(...)
let link = storage.linkFile(localFile) // queue to upload

let feed = [ user: "Alex", photo : link ];

firebase.child(...).setValue(feed)

Now, FB detect a "link to storage" and queue data to be saved after upload. If App restart, upload continues without problem. The offline version of FB see the data without problem, like today, but will be only synchronized after file upload, so its make easy to delete data not synchronized.

Thanks,
Alexnaldo Santos





Reply all
Reply to author
Forward
0 new messages