Django 3.0.x Documentation
with open('some/file/name.txt', 'wb+') as destination: for chunk in f.chunks(): destination.write(chunk) Looping over UploadedFile.chunks() instead of using read() ensures that typically implemented as follows: def wrap_streaming_content(content): for chunk in content: yield alter_content(chunk) Exception handling Django automatically converts exceptions raised by the Iterate over the file yielding one line at a time. chunks(chunk_size=None)[source] Iterate over the file yielding “chunks” of a given size. chunk_size defaults to 64 KB. This is especially useful with0 码力 | 3085 页 | 2.95 MB | 1 年前3Django 3.1.x Documentation
with open('some/file/name.txt', 'wb+') as destination: for chunk in f.chunks(): destination.write(chunk) Looping over UploadedFile.chunks() instead of using read() ensures that typically implemented as follows: def wrap_streaming_content(content): for chunk in content: yield alter_content(chunk) Exception handling Django automatically converts exceptions raised by the Iterate over the file yielding one line at a time. chunks(chunk_size=None)[source] Iterate over the file yielding “chunks” of a given size. chunk_size defaults to 64 KB. This is especially useful with0 码力 | 3094 页 | 3.03 MB | 1 年前3Django 4.2.x Documentation
with open("some/file/name.txt", "wb+") as destination: for chunk in f.chunks(): destination.write(chunk) Looping over UploadedFile.chunks() instead of using read() ensures that typically implemented as follows: def wrap_streaming_content(content): for chunk in content: yield alter_content(chunk) StreamingHttpResponse allows both synchronous and asynchronous iterators Iterate over the file yielding one line at a time. chunks(chunk_size=None) Iterate over the file yielding “chunks” of a given size. chunk_size defaults to 64 KB. This is especially useful with very0 码力 | 3305 页 | 3.16 MB | 1 年前3Django 4.1.x Documentation
with open('some/file/name.txt', 'wb+') as destination: for chunk in f.chunks(): destination.write(chunk) Looping over UploadedFile.chunks() instead of using read() ensures that typically implemented as follows: def wrap_streaming_content(content): for chunk in content: yield alter_content(chunk) Exception handling Django automatically converts exceptions raised by the Iterate over the file yielding one line at a time. chunks(chunk_size=None) Iterate over the file yielding “chunks” of a given size. chunk_size defaults to 64 KB. This is especially useful with very0 码力 | 3240 页 | 3.13 MB | 1 年前3Django 5.1.2 Documentation
handle_uploaded_file(f): with open("some/file/name.txt", "wb+") as destination: for chunk in f.chunks(): destination.write(chunk) Looping over UploadedFile.chunks() instead of using read() ensures that large is typically implemented as follows: def wrap_streaming_content(content): for chunk in content: yield alter_content(chunk) StreamingHttpResponse allows both synchronous and asynchronous iterators. The Iterate over the file yielding one line at a time. chunks(chunk_size=None) Iterate over the file yielding “chunks”of a given size. chunk_size defaults to 64 KB. This is especially useful with very0 码力 | 2923 页 | 9.62 MB | 1 年前3Django 5.1 Documentation
with open("some/file/name.txt", "wb+") as destination: for chunk in f.chunks(): destination.write(chunk) Looping over UploadedFile.chunks() instead of using read() ensures that typically implemented as follows: def wrap_streaming_content(content): for chunk in content: yield alter_content(chunk) StreamingHttpResponse allows both synchronous and asynchronous iterators time. chunks(chunk_size=None)[source] [https://github.com/django/django/blob/stable/5.1.x/django/core/files/base.py#L 48] Iterate over the file yielding “chunks” of a given size. chunk_size defaults0 码力 | 3513 页 | 3.17 MB | 1 年前3Django 5.1 Documentation
handle_uploaded_file(f): with open("some/file/name.txt", "wb+") as destination: for chunk in f.chunks(): destination.write(chunk) Looping over UploadedFile.chunks() instead of using read() ensures that large is typically implemented as follows: def wrap_streaming_content(content): for chunk in content: yield alter_content(chunk) StreamingHttpResponse allows both synchronous and asynchronous iterators. The Iterate over the file yielding one line at a time. chunks(chunk_size=None) Iterate over the file yielding “chunks”of a given size. chunk_size defaults to 64 KB. This is especially useful with very0 码力 | 2917 页 | 9.59 MB | 1 年前3Django 5.1.2 Documentation
with open("some/file/name.txt", "wb+") as destination: for chunk in f.chunks(): destination.write(chunk) Looping over UploadedFile.chunks() instead of using read() ensures that typically implemented as follows: def wrap_streaming_content(content): for chunk in content: yield alter_content(chunk) StreamingHttpResponse allows both synchronous and asynchronous iterators time. chunks(chunk_size=None)[source] [https://github.com/django/django/blob/stable/5.1.x/django/core/files/base.py#L 48] Iterate over the file yielding “chunks” of a given size. chunk_size defaults0 码力 | 3519 页 | 3.17 MB | 1 年前3Django 5.0.x Documentation
handle_uploaded_file(f): with open("some/file/name.txt", "wb+") as destination: for chunk in f.chunks(): destination.write(chunk) Looping over UploadedFile.chunks() instead of using read() ensures that large is typically implemented as follows: def wrap_streaming_content(content): for chunk in content: yield alter_content(chunk) StreamingHttpResponse allows both synchronous and asynchronous iterators. The Iterate over the file yielding one line at a time. chunks(chunk_size=None) Iterate over the file yielding “chunks”of a given size. chunk_size defaults to 64 KB. This is especially useful with very0 码力 | 2878 页 | 9.60 MB | 1 年前3Django 5.0.x Documentation
with open("some/file/name.txt", "wb+") as destination: for chunk in f.chunks(): destination.write(chunk) Looping over UploadedFile.chunks() instead of using read() ensures that typically implemented as follows: def wrap_streaming_content(content): for chunk in content: yield alter_content(chunk) StreamingHttpResponse allows both synchronous and asynchronous iterators Iterate over the file yielding one line at a time. chunks(chunk_size=None) Iterate over the file yielding “chunks” of a given size. chunk_size defaults to 64 KB. This is especially useful with very0 码力 | 3407 页 | 3.21 MB | 1 年前3
共 30 条
- 1
- 2
- 3