core.files.uploadedfile.UploadedFile.chunks()

UploadedFile.chunks(chunk_size=None)

A generator returning chunks of the file. If multiple_chunks() is True, you should use this method in a loop instead of read().

In practice, it’s often easiest simply to use chunks() all the time. Looping over chunks() instead of using read() ensures that large files don’t overwhelm your system’s memory.

Here are some useful attributes of UploadedFile:

doc_Django
2016-10-09 18:34:49
Comments
Leave a Comment

Please login to continue.