File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -346,7 +346,7 @@ def _submit(
346346 :param bandwidth_limiter: The bandwidth limiter to use when
347347 downloading streams
348348 """
349- if transfer_future .meta .size is None :
349+ if transfer_future .meta .size is None and config . multipart_threshold > 0 :
350350 # If a size was not provided figure out the size for the
351351 # user.
352352 response = client .head_object (
@@ -364,7 +364,7 @@ def _submit(
364364
365365 # If it is greater than threshold do a ranged download, otherwise
366366 # do a regular GetObject download.
367- if transfer_future .meta .size < config .multipart_threshold :
367+ if config . multipart_threshold <= 0 or transfer_future .meta .size < config .multipart_threshold :
368368 self ._submit_download_request (
369369 client ,
370370 config ,
You can’t perform that action at this time.
0 commit comments