Reputation: 479
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
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
Reputation: 4104
Did you try gitignore? https://devcenter.heroku.com/articles/gitignore#ignoring_directories
Upvotes: 0