Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why do uploaded pictures disappear on Heroku?

I deployed my first Heroku app yesterday, and everything worked great.

In my app you can upload an image, I did and could see it on the "show" page. However, today the image disappeared. Everything else seems to work just fine. The application is working just fine on my local machine as well as on Heroku, other than the image which is not there.

What may be the problem? How can I make sure it doesn't happen again?

like image 261
Lucy Weatherford Avatar asked Apr 25 '13 08:04

Lucy Weatherford


People also ask

Does Heroku support image upload?

Image uploading and resizing with a prebuilt S3 setup. Free cloud storage.

Does Heroku have persistent storage?

Heroku does not provide any sort of persistent storage on dynos. If you need to persist files across sessions, you must use object storage such as Amazon S3.

Where is Heroku data stored?

Heroku's physical infrastructure is hosted and managed within Amazon's secure data centers and utilize the Amazon Web Service (AWS) technology.


1 Answers

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

like image 149
Derry Uk Avatar answered Sep 29 '22 11:09

Derry Uk