Reputation: 421
My project is about an online Shopping site. I use paperclip gem to updload image. My problem is: I can upload images,show them.But after 4-5 hours it cant show image.It doesn't images. What should I do to save Images all time ?
Upvotes: 0
Views: 53
Reputation: 6952
Heroku deletes files in your public folder every time it instantiates a new VM (usually after your app has been dormant for a few minutes.)
You need to store your images in a place where they will persist when a VM is destroyed. Heroku has a tutorial on how to store the files at S3 here:
https://devcenter.heroku.com/articles/paperclip-s3
Upvotes: 1
Reputation: 2345
Upvotes: 0