No doubt heroku is the greatest thing since sliced bread, with easy deployment and stuff, and it is free to start with. Perfect for stingy developer like me. So I am working on a rails apps, deployed to heroku, with paperclip for image upload. Things work fine, except images I uploaded keep on missing. I thought heroku wouldn’t store image for free user, ha.
A quick search around internet, sure enough it is stackoverflow come with an answer top in the list. It turn out that only images in the commit and pushed to heroku are kept, example logo or icon used in the apps. Uploaded images will be removed with each push to heroku, clearly images uploaded via paperclip fall into the latter category.
Solution is to use a 3rd party storage, like Amazon Simple Storage Service. Of course, aws is free to start with as well, a free account includes 5Gb storage, 20k Get requests, 2k put request, yada yada, another great thing for stingy developer, hurray!
kahfei | Getting paperclip, heroku and aws s3 non-us region bucket working together
[…] found out earlier, only images come with commits and pushed to heroku are […]
Gabe_b
Perfect, just the info I was looking for. Thanks!
Alex
Thank you for a great tip!! Could you write a small tutorial for Heroku / Images uploading to AWS set up /process? Thank you!!
Nike
Thanks, your article helps me to find and realise AWS, nice)
Shreya Chakrabarti
So if I have uploaded the images after my final push to heroku and I oush no other updates to heroku will my images remain as it is?
Let me know
kahfei
Hi Shreya, in your case do you mean you have images stored in heroku or a third party storage service?
If it is the former, then even if there is no further push to heroku, images might be lost as well, as what I found out in stackoverflow, due to dyno restart that happen occasionally.
kahfei
This is two years late reply. But, hey, glad if this does help 🙂
kahfei
Sorry, this reply is two years late ;-), and I haven’t used heroku for a while now. Guess you have find something useful for heroku/images uploading to AWS setup/process on the net?
kahfei
Glad that this help you 🙂