문제

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.

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top