Why do uploaded pictures disappear on Heroku?

I suspect you may have uploaded the image to the Heroku filesystem and not an external filestore like Amazon S3. Heroku file system is temporary and not shared across dynos or restarts - which Heroku will do every day. I suspect this is what has occurred here resulting in you loosing your image.


Heroku is file system is temporary. Alternative you can save the images as a url, until you are ready for aws...


Heroku does not support file uploads. The filesystem is readonly. You'll have to host your uploaded files somewhere else (or from the database, which is a bad option).

https://devcenter.heroku.com/articles/read-only-filesystem

Amazon S3 is a common choice: http://devcenter.heroku.com/articles/s3

If you are using any gems like paperclip or carrierwave for uploading, using S3 will be simple. You will have to set the S3 credentials in a config file and the gem will take care of uploading and will provide urls for the uploaded file.