Noam
Noam

Reputation: 479

saving a folder from being destroyed after push on heroku

I have an app that lets users upload documents. The app saves the documents to a folder on the server, say users_documents. The app is hosted on Heroku.

When I do a git push heroku master the new app is deployed but all the files in users_documents are deleted, is there a way to tell git (or heroku) not to rewrite that folder?

Upvotes: 2

Views: 69

Answers (2)

sarnold
sarnold

Reputation: 104050

You should probably be storing your data in something more permanent than Heroku's ephemeral file storage. When the dyno is restarted your data disappears, and even if you have no intentions of restarting your dyno, Heroku maintenance may start new ones as hardware needs maintenance.

Upvotes: 1

Related Questions