9
You shouldn’t write anything to the file system, Heroku clearly states it’s ephemeral and should not be used for anything.
https://devcenter.heroku.com/articles/dynos#ephemeral-filesystem
Instead, you need to use a proper media storage backend, such as Amazon S3. For your Django project, check out django-storages with the S3 backend
http://django-storages.readthedocs.org/en/latest/backends/amazon-S3.html
0
You can also plan to add file to the db, as explained here. This is good if you crane or bigger postgresql plans, so that you don’t have to setup an S3 bucket.
- [Django]-How do you render a django form in a view?
- [Django]-Django modelform with bootstrap
- [Django]-Django CMS page_attribute falls back to other values?
- [Django]-TinyMCE popups not loading when using S3 and setting document.domain
- [Django]-Passing Editable Fields as validated_data method of Django-Rest-Framework Serializer
Source:stackexchange.com