0

Am working on an aldryn-newsblog. it works well on my local host. once i push the blog to heroku, thats when i get a problem. Every time i add a new article, the article publishes very well with no problem. but after some time,say 20 mins the featured image just disappears. This forces me to edit the article again so as to add the image afresh. image showing my file missing once i try to edit my article

What might be the problem? kindly assist.

Phares
  • 1,008
  • 13
  • 20
  • what kind a database are you using? – copser Jul 20 '16 at 18:06
  • I will assume you are using default `sqlite3` database for this project, you need to set up `postgresql` for production purposes, or `mysql`, you can read more about when to use `sqlite3` [here](https://www.sqlite.org/whentouse.html) – copser Jul 20 '16 at 18:19
  • Hi @Svekar i am using postgresql – Phares Jul 21 '16 at 07:44

1 Answers1

0

Heroku uses ephemeral file system (files may be written to the app’s “tmp/” directory, but can be discarded by the system at any time)

Use a cloud storage service instead, see https://devcenter.heroku.com/articles/s3

Heroku docs: https://devcenter.heroku.com/articles/dynos#ephemeral-filesystem

mishbah
  • 5,487
  • 5
  • 25
  • 35
  • this will undo several weeks' work and apparently it is the only thing that hasn't been accomplished, is there no other way to fix the problem? like instead of the file i change to a link to file unfortunately which i have not been able to figure out how to fix. – Phares Jul 22 '16 at 08:39