I am wondering if there are any ramifications in uploading files that are roughly 4GB in size through a web app using Django/Python? I remember in the past streaming uploads
The last answer covers it. We routinely upload 2.5mb+ (but usually not 4gb)
adamnish link is correct, see this snippet (from his link to django docs) regarding writing the file to disk, instead of having it in memory first:
def handle_uploaded_file(f):
with open('some/file/name.txt', 'wb+') as destination:
for chunk in f.chunks():
destination.write(chunk)
More info on the "chunks" call: https://docs.djangoproject.com/en/dev/ref/files/uploads/#django.core.files.uploadedfile.UploadedFile.chunks
Page includes how to set "chunk" size, etc.