I'm trying to develop a Django application that will eventually serve a large media file repository (10's to 100's of GB) that would ultimately be stored on B2 or S3 instead of locally on the server.
For application related static content, I think I understand that you will have a /static/ in your application tree, and a /static/ in your web server tree. When you run python manage.py collectstatic
the files are compared, and the web server file tree is updated based on the application file tree.
Since these would ultimately be uploaded by a user, should I instead be thinking of the MEDIA_ROOT
and MEDIA_URL
settings? These would then be staging areas prior to preparation and upload to B2 or S3.
I've checked these out:
Identical and simple way of serving static files in development and production - is it possible?
Django: Deploying static files in production environment
serving django media (user uploaded) files in production
Serve media files with a static service. Dotcloud
and I feel like they are probably starting down the right path, but there is minimal discussion so I don't know the alternatives.
Are there other approaches I should consider?