From 75121ec065337072838ceae96708f911730a5afe Mon Sep 17 00:00:00 2001 From: zhshch Date: Sat, 13 Oct 2018 16:09:13 +0800 Subject: [PATCH] fix split block limit 8M will cause upload timeout --- qiniu/services/storage/uploader.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qiniu/services/storage/uploader.py b/qiniu/services/storage/uploader.py index 4e1a2157..95680c3e 100644 --- a/qiniu/services/storage/uploader.py +++ b/qiniu/services/storage/uploader.py @@ -67,7 +67,7 @@ def put_file(up_token, key, file_path, params=None, with open(file_path, 'rb') as input_stream: file_name = os.path.basename(file_path) modify_time = int(os.path.getmtime(file_path)) - if size > config._BLOCK_SIZE * 2: + if size > config._BLOCK_SIZE: ret, info = put_stream(up_token, key, input_stream, file_name, size, params, mime_type, progress_handler, upload_progress_recorder=upload_progress_recorder,