Skip to content

Commit 9be0bed

Browse files
committed
Don't do multi-part downloads on files smaller than 25 MB
1 parent 3c63a62 commit 9be0bed

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

frameioclient/lib/download.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,13 @@ def download_handler(self):
130130
if self.multi_part == True:
131131
return self.multi_part_download(url)
132132
else:
133-
return self.download(url)
133+
# Don't use multi-part download for files below 25 MB
134+
if self.asset['filesize'] < 26214400:
135+
return self.download(url)
136+
if self.multi_part == True:
137+
return self.multi_part_download(url)
138+
else:
139+
return self.download(url)
134140

135141
def download(self, url):
136142
start_time = time.time()

0 commit comments

Comments
 (0)