From 9196210e895365689f323cb677b30ac73beb1597 Mon Sep 17 00:00:00 2001 From: "parsa.hassani30" Date: Wed, 27 Oct 2021 06:17:19 +0330 Subject: [PATCH] solve pre commit problem --- src/flask/helpers.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/flask/helpers.py b/src/flask/helpers.py index 3f99aa2e..72c8ca1f 100644 --- a/src/flask/helpers.py +++ b/src/flask/helpers.py @@ -627,10 +627,12 @@ def send_file( ) def send_chunked_file(filepath:str , chunk_size: int = 8192): - """ If you serve binary files, you should not iterate through lines since + """ If you serve binary files, + you should not iterate through lines since it basically contains only one line, which means you still load the whole file all at once into the RAM. The only proper - way to read largit checkout files is via chunks with this function: read_file_chunks(path, chunk_size) + way to read largit checkout files is via chunks with + this function: read_file_chunks(path, chunk_size) send every chunks with stream_with_context function :param filepath: file exists there . If not provided, error occured.