Django Upload File

Simple upload file
os.path.join(BASE_DIR, 'myapp', 'templates')
myapp/templates/home.html
myapp/views.py
myapp/media
MEDIA_URL = '/media/' #newMEDIA_ROOT = os.path.join(BASE_DIR, 'myapp', 'media') #new
myapp/urls.py
myproject/urls.py
home
upload file
upload file success
uploaded file to media folder
File access via url (for image file will be show in folder, some format will be auto-downloaded)

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store