Derek
Derek

Reputation: 12378

Heroku deleting files upon git push?

I have a media folder that stores all my uploaded images during development and I'm pushing my django(1.5.1) project to a dev server on heroku. Inside the media folder I have

media/
    # cache and images were commited before .gitignored was added
    cache/ # store thumbnails
    images/ # store images
    .gitignore

the .gitignore has

*
!.gitignore

The problem is whenever I git push to heroku, all my testing uploads are wiped out by git. Is there a way to deal with this?

Upvotes: 5

Views: 2125

Answers (1)

mipadi
mipadi

Reputation: 410652

This isn't an issue with Git, but rather with Heroku. Heroku's file system is ephemeral, and is reset between deploys. Use a service like Amazon S3 to store uploaded files.

Upvotes: 9

Related Questions