Skip to content

Commit 76c743e

Browse files
committed
修改方法名称
1 parent 19788df commit 76c743e

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

examples/example_list_parts.py renamed to examples/example_get_multi_upload_part.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717

1818
multi_part_upload_ufile_handler = multipartuploadufile.MultipartUploadUFile(public_key, private_key, upload_suffix)
1919

20-
ret, resp = multi_part_upload_ufile_handler.list_parts(bucket, upload_id, max_parts, part_number_marker,
21-
upload_suffix=upload_suffix)
20+
ret, resp = multi_part_upload_ufile_handler.get_multi_upload_part(bucket, upload_id, max_parts, part_number_marker,
21+
upload_suffix=upload_suffix)
2222
assert resp.status_code == 200, print(
2323
"status: %d error: %s" % (resp.status_code, resp.error if resp.error else resp.content))
2424

ufile/httprequest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ def _bucket_request(url, param, header):
327327
return __return_wraper(response)
328328

329329

330-
def _list_parts(url, header):
330+
def _get_multi_upload_part(url, header):
331331
"""
332332
UCloud UFile 获取分片上传列表信息请求
333333

ufile/multipartuploadufile.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from . import config
1010
from .baseufile import BaseUFile
1111
from .compact import s
12-
from .httprequest import ResponseInfo, _initialsharding, _finishsharding, _shardingupload, _list_parts
12+
from .httprequest import ResponseInfo, _initialsharding, _finishsharding, _shardingupload, _get_multi_upload_part
1313
from .logger import logger
1414
from .util import _check_dict, initialsharding_url, finishsharding_url, shardingupload_url, _file_iter, \
1515
mimetype_from_file, mimetype_from_buffer, deprecated, ufile_listparts_url
@@ -446,7 +446,7 @@ def upload_part_copy(self, source_bucket, source_key, mime_type, offset, size, p
446446
self.etaglist.append(resp.etag)
447447
return ret, resp
448448

449-
def list_parts(self, bucket, upload_id, max_parts=None, part_number_marker=None, header=None, upload_suffix=None):
449+
def get_multi_upload_part(self, bucket, upload_id, max_parts=None, part_number_marker=None, header=None, upload_suffix=None):
450450
"""
451451
获取未完成分片上传的对象的已上传成功的分片列表。
452452
@@ -466,4 +466,4 @@ def list_parts(self, bucket, upload_id, max_parts=None, part_number_marker=None,
466466
authorization = self.authorization('get', bucket, "", self.__header, action='muploadpart')
467467
self.__header.update({"Authorization": authorization})
468468
url = ufile_listparts_url(bucket, self.__upload_suffix, upload_id, max_parts, part_number_marker)
469-
return _list_parts(url, self.__header)
469+
return _get_multi_upload_part(url, self.__header)

0 commit comments

Comments
 (0)