ruby on rails - Picture disappeared on Heroku -


i deployed first heroku app yesterday, , worked great.

in app can upload image, did , see in "show" page. today image disappeared. else seems work fine. application working fine on local machine on heroku, other image not there.

what may problem? how can make sure doesn't happen again?

heroku not support file uploads. filesystem readonly. you'll have host uploaded files somewhere else (or database, bad option).

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

amazon s3 common choice: http://devcenter.heroku.com/articles/s3

if using gems paperclip or carrierwave uploading, using s3 simple. have set s3 credentials in config file , gem take care of uploading , provide urls uploaded file.


Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -