A project may involve uploading of different types of files such as images, videos, documents etc. depending the features it has. In Django all these files are uploaded into the media
folder. This directory also needs to be created and configured in the settings.py
file.
So first, start by creating a folder named media
in the base directory of your project.
After the creation of the folder, it needs to be added inside the settings.py
file.
MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
This will allow to upload the input files, mapped to model fields in the media
folder.