lundi 13 juin 2016

Facebook-like cover photo upload, reposition and save in RoR


I have a website where I have a profile page on which I want a cover photo with 100% width and fixed height. I would like to add a feature of instant upload like on facebook, and that the user can reposition the cover photo (also as on fb) and then save it. I use Paperclip. The closest thing I found on the net was this: http://w3lessons.info/2014/08/31/facebook-style-cover-image-reposition-using-jquery-php/ but it's in PHP and my app is in Ruby on Rails (don't know how to change this code to RoR). This is not cropping, and I found a lot of crop tutorials. It's like having a fixed height and width and moving the photo as it fits to that size, and save it. Any idea what could I use to make things easier for me, since I'm not that good in js, jquery etc. I know it's not a very precise question, but I don't know in which direction to go from here. Thanks in advance.


Aucun commentaire:

Enregistrer un commentaire