Is there a way to store images locally and sync to cloud storage when device online?

433 views
Skip to first unread message

riyaj ahamed ibrahim

unread,
Jul 29, 2020, 1:57:04 PM7/29/20
to Flutter Development (flutter-dev)

I'm working on a scenario where user add the images in offline mode. And when user is online the images should sync to Google cloud storage.


I'm trying to implement this scenario with flutter and google cloud storage.


Can anyone help me on this?


Thanks is advance!!!

Suzuki Tomohiro

unread,
Jul 29, 2020, 2:41:59 PM7/29/20
to riyaj ahamed ibrahim, Flutter Development (flutter-dev)
What’s the problem you’re facing?

--
You received this message because you are subscribed to the Google Groups "Flutter Development (flutter-dev)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flutter-dev/128d7251-39e2-44cf-9cca-007d55d79a91o%40googlegroups.com.

Souvik Dutta

unread,
Jul 29, 2020, 8:56:29 PM7/29/20
to riyaj ahamed ibrahim, Flutter Development (flutter-dev)
Firebase automatically does this. So you don't have to implement this yourself.

Souvik flutter dev

--

Graham Dickinson

unread,
Jul 30, 2020, 3:13:25 AM7/30/20
to Flutter Development (flutter-dev)
Sorry, Souvik, but only the Firebase database automatically handles on and off line synchronisation as far as I am aware. With cloud storage you have to manage this manually so Riyaj would have to store the images in eg. the device file system and then send them to Cloud Storage when connection is resumed.

riyaj ahamed ibrahim

unread,
Jul 30, 2020, 3:31:04 AM7/30/20
to Flutter Development (flutter-dev)
Thanks for your answer, Graham. Can we store the images in SQLite when offline and sync back to Cloud storage when the connection is resumed?

Graham Dickinson

unread,
Jul 30, 2020, 3:43:06 AM7/30/20
to Flutter Development (flutter-dev)
I would assume so, or Hive, if you want to use a db. I don't use either so can't be completely confident. I use FB RTDB's automatic sync extensively for data in my app but I don't allow any image processing when the app is offline so this is not an issue for me. If cloud storage did automatically sync, I would probably allow image processing when off line. I just decided the manual syncing was too much work for what the app needs to do. :-)

riyaj ahamed ibrahim

unread,
Jul 30, 2020, 3:47:07 AM7/30/20
to Flutter Development (flutter-dev)
Thanks for your feedback. This help me a lot.

Souvik Dutta

unread,
Jul 30, 2020, 3:47:56 AM7/30/20
to Graham Dickinson, Flutter Development (flutter-dev)
Oh yes just saw it doesn't support automatic synching. Sorry my bad. 

On Thu, Jul 30, 2020, 12:43 PM Graham Dickinson <dickinso...@gmail.com> wrote:
Sorry, Souvik, but only the Firebase database automatically handles on and off line synchronisation as far as I am aware. With cloud storage you have to manage this manually so Riyaj would have to store the images in eg. the device file system and then send them to Cloud Storage when connection is resumed.

--
You received this message because you are subscribed to the Google Groups "Flutter Development (flutter-dev)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages