Using Heroku for Django Media Files

Reason

Heroku runs your application on dynos and dynos go to sleep after 30 minutes if there is not request comes, this makes Heroku not preserve user upload media files between dynos restart.

Solution

Use Amazon S3 service for storing and serving media files + you can also serve static files from S3 also. for documentation refer here.

Leave a Comment