MEDIA_ROOT and File Uploads
Accept and store user-uploaded files.
Static vs Media
Static files ship with your code. Media files are uploaded by your users at runtime, like avatars or documents, and they need their own home.
The MEDIA_ROOT Setting
MEDIA_ROOT is the absolute folder on disk where Django saves every uploaded file. It lives outside your source code tree.
MEDIA_ROOT = BASE_DIR / 'media'All lessons in this course
- STATICFILES and the static Tag
- collectstatic for Production
- MEDIA_ROOT and File Uploads
- ImageField and Serving Uploads