Lepozepo / cloudinary

MIT License
94 stars 42 forks source link

Allows offline #86

Closed nicooprat closed 8 years ago

nicooprat commented 8 years ago

Pictures are inserted in local collection, before checking connection and signing with Cloudinary API. I added a new status waiting to local documents before the upload begins.

You can try in your browser console:

Meteor.connection.disconnect();
// Then try to upload a file
Cloudinary.collection.find().fetch();
// Returns the local picture object
Meteor.connection.reconnect()
// If no error in callback, the upload begins
// else, the picture is removed from the local collection

PS. I saw the recent hotfix and took it into account in this commit. Sorry for the bug :)

Lepozepo commented 8 years ago

Hey @nicooprat, if you could resolve conflicts that would be great. I'll have a closer look before accepting PRs now just to make sure everything is in order. Tests would be good, lol.

nicooprat commented 8 years ago

New PR coming...