简体   繁体   中英

Offline image upload for Meteor.js app

There is a Meteor.js app, which is suppose to stay fully functional in offline mode. This app enables users to upload their images and use those images to create content within the app.

Question - how to approach image upload in the Meteor.js app, so that the app stays fully functional in offline mode?

My thoughts so far:

--There is Meteor Offline Data project, but it is still very much work in progress, and it only works for text content: https://github.com/awwx/meteor-offline-data

--In offline, when adding the image in the app, I could detect offline mode and utilize HTML5 File API for using the image locally

--When online is detected, the image is uploaded to the server behind the scenes

--In online content with images is downloaded to the app and saved for offline usage using App Cache

There are still many things unclear, so any hints are appreciated at this point.

You may want to try collectionFS, https://atmosphere.meteor.com/package/collectionFS , as it make a client side collection that the file is added to. The clientside collection should sink when the internet reconnects.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM