How to Handle Big Data Uploads in Django
Traditional File Uploads in Django Handling non-trivial big data file uploads (think >5gb/file) in Django can be challenging. A typical file upload storage strategy in Django is to use django-storages and an Amazon S3 backend. In the traditional way, your browser uploads the file directly to Django which then transmits the data to S3. This creates two problems: Django needs to have enough memory to hold your uploaded file for retransmission. The Django worker receiving the file upload is blocked until the upload is finished. Streaming the upload onwards to S3 doubles the amount of bandwidth used. What if we could instead upload directly into AWS S3 while registering the upload with Django? I stumbled across this excellent article by Radoslav Georgiev of HackSoft: https://www.hacksoft.io/blog/direct-to-s3-file-upload-with-django ...