Question

I´m building a rails app that stores a database object with an image and some extra information. My next move is to make it work offline. I´m using paperclip to manage the images.

After some research I found some possibilities to sync the remote database with the client side database. I´m using Backbone.js and persistence.js with its sync plugin. But I'm not sure how to handle the images.

Was it helpful?

Solution

I think that images are actually stored in disk and DB stored only metadata about them. But you can try to found a gem to store image as a BLOB in DB. In this case if persistence.js can sync and store BLOB you than will be able to manipulate it in JS and render as an img tag.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top