Django File Upload

Django file upload guide

Get Started. It's Free
or sign up with your email address
Rocket clouds
Django File Upload by Mind Map: Django File Upload

1. Basic Concepts

1.1. Send file using POST request

1.2. Set proper form encode type

1.2.1. enctype="multipart/form-data"

1.3. Files are uploaded to request.FILES

1.3.1. Dictionary-like object

1.3.2. Each file is an UploadedFile instance

2. Configuration



2.3. Serving media files on local machine

3. Handling Uploaded Files

3.1. File storage API - FileSystemStorage

3.2. Model form fields FileField and ImageField

3.2.1. FileField File saved in the file system Saved as text in the database File is not deleted if object is deleted Override model delete method

3.2.2. ImageField Pillow — Pillow (PIL Fork) 5.3.0 documentation