Skip to content

Commit 00303d7

Browse files
authored
Update cos_client.py
1 parent 22a56a7 commit 00303d7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

qcloud_cos/cos_client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2994,7 +2994,7 @@ def _check_all_upload_parts(self, bucket, key, uploadid, local_path, parts_num,
29942994
already_exist_parts[part_num] = part['ETag']
29952995
return True
29962996

2997-
def download_file(self, Bucket, Key, DestFilePath, PartSize=20, MAZThread=5, EnableCRC=False, **Kwargs):
2997+
def download_file(self, Bucket, Key, DestFilePath, PartSize=20, MAXThread=5, EnableCRC=False, **Kwargs):
29982998
"""小于等于20MB的文件简单下载,大于20MB的文件使用续传下载
29992999
30003000
:param Bucket(string): 存储桶名称.
@@ -3006,7 +3006,7 @@ def download_file(self, Bucket, Key, DestFilePath, PartSize=20, MAZThread=5, Ena
30063006
:param kwargs(dict): 设置请求headers.
30073007
"""
30083008
logger.debug("Start to download file, bucket: {0}, key: {1}, dest_filename: {2}, part_size: {3}MB,\
3009-
max_thread: {4}".format(Bucket, Key, DestFilePath, PartSize, MAZThread))
3009+
max_thread: {4}".format(Bucket, Key, DestFilePath, PartSize, MAXThread))
30103010

30113011
object_info = self.head_object(Bucket, Key)
30123012
file_size = int(object_info['Content-Length'])
@@ -3015,7 +3015,7 @@ def download_file(self, Bucket, Key, DestFilePath, PartSize=20, MAZThread=5, Ena
30153015
response['Body'].get_stream_to_file(DestFilePath)
30163016
return
30173017

3018-
downloader = ResumableDownLoader(self, Bucket, Key, DestFilePath, object_info, PartSize, MAZThread, EnableCRC, **Kwargs)
3018+
downloader = ResumableDownLoader(self, Bucket, Key, DestFilePath, object_info, PartSize, MAXThread, EnableCRC, **Kwargs)
30193019
downloader.start()
30203020

30213021
def upload_file(self, Bucket, Key, LocalFilePath, PartSize=1, MAXThread=5, EnableMD5=False, **kwargs):

0 commit comments

Comments
 (0)