user5598490
user5598490

Reputation:

Images in public folder not found after each push on heroku

I am having issues with my Rails App on Heroku.

After every push to heroku any images I uploaded with paperclip Gem return a 404 error message. How I resolve this?

Upvotes: 0

Views: 1023

Answers (1)

spickermann
spickermann

Reputation: 106792

You cannot use the local file system on Heroku to store uploaded files, because you get a new instance each time you deploy. I advise to read about Ephemeral filesystem on Heroku.

To fix your problem you show store uploaded files on an external service like Amazon S3. You might want to follow Heroku's documentation about uploading to S3

Upvotes: 3

Related Questions