Another team member has written the feature to allow users to upload a photo using a http form and the Rails Paperclip gem.
I am currently working on a feature to import a list of photos from the users Facebook album.
I currently have a list of the Facebook image URLs that need to be saved. I am able to get rails to download them and save to a location but I can’t figure out how to trigger the paperclip process.
Where is the best place to add in my code to download the image from the URL?
Any ideas appreciated, thanks.
I have found the following question that answers my question.
Paperclip fetch image directly via url
Here’s what i’m doing to save my image:
And I have this function in the Photo model. Note, picture is the image field that paperclip uses.