Skip to content

Commit 0d782cc

Browse files
committed
fix bug
1 parent 4f5f07b commit 0d782cc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

qcloud_cos/cos_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2958,7 +2958,7 @@ def download_file(self, Bucket, Key, DestFilePath, PartSize=20, MAZThread=5, Ena
29582958
max_thread: {4}".format(Bucket, Key, DestFilePath, PartSize, MAZThread))
29592959

29602960
object_info = self.head_object(Bucket, Key)
2961-
file_size = object_info['Content-Length']
2961+
file_size = int(object_info['Content-Length'])
29622962
if file_size <= 1024*1024*20:
29632963
response = self.get_object(Bucket, Key, **Kwargs)
29642964
response['Body'].get_stream_to_file(DestFilePath)

0 commit comments

Comments
 (0)