Skip to content

Commit

Permalink
upload 3.20.11
Browse files Browse the repository at this point in the history
  • Loading branch information
goodcode-best committed Nov 9, 2020
1 parent 50dee8a commit b9936cd
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 7 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
Version 3.20.11

New Features:

Documentation & Demo:

Resolved Issues:
1. Fixed the issue that the uploadFile and downloadFile APIs do not support server-side encryption header.

-------------------------------------------------------------------------------------------------
Version 3.20.9.1

New Features:
Expand Down
12 changes: 11 additions & 1 deletion README_CN.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
Version 3.20.9.1
Version 3.20.11

新特性:

资料&demo:

修复问题:
1. 修复uploadFile/downloadFile接口,不支持指定携带加密头域的问题;

-------------------------------------------------------------------------------------------------
Version 3.20.9.1

新特性:

Expand Down
Binary file not shown.
1 change: 1 addition & 0 deletions release/huaweicloud-obs-sdk-python_3.20.11.tar.gz.sha256
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
952587584744feb61bf99c697d429d0ea7ff58a40b8bd9bcff1814a65f36ba6c *huaweicloud-obs-sdk-python_3.20.11.tar.gz
2 changes: 1 addition & 1 deletion src/obs/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
DEFAULT_TASK_NUM = 8
DEFAULT_TASK_QUEUE_SIZE = 20000

OBS_SDK_VERSION = '3.20.9.1'
OBS_SDK_VERSION = '3.20.11'

V2_META_HEADER_PREFIX = 'x-amz-meta-'
V2_HEADER_PREFIX = 'x-amz-'
Expand Down
15 changes: 11 additions & 4 deletions src/obs/transfer.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,8 @@ def _upload_part(self, part):
self._record['uploadId'], self.fileName,
isFile=True, partSize=part['length'],
offset=part['offset'], notifier=self.notifier,
extensionHeaders=self.extensionHeaders)
extensionHeaders=self.extensionHeaders,
sseHeader=self.headers.sseHeader)
if resp.status < 300:
self._record['uploadParts'][part['partNumber'] - 1]['isCompleted'] = True
self._record['partEtags'].append(CompletePart(util.to_int(part['partNumber']), resp.body.etag))
Expand Down Expand Up @@ -385,7 +386,9 @@ def __init__(self, bucketName, objectKey, downloadFile, partSize, taskNum, enabl

self._tmp_file = self.fileName + '.tmp'
metedata_resp = self.obsClient.getObjectMetadata(self.bucketName, self.objectKey, self.versionId,
extensionHeaders=self.extensionHeaders)
extensionHeaders=self.extensionHeaders,
sseHeader=self.header.sseHeader, origin=self.header.origin,
requestHeaders=self.header.requestHeaders)
if metedata_resp.status < 300:
self.lastModified = metedata_resp.body.lastModified
self.size = metedata_resp.body.contentLength \
Expand Down Expand Up @@ -583,6 +586,10 @@ def _consume(self, ThreadPool):
def _copy_get_object_header(self, src_header):
get_object_header = GetObjectHeader()
get_object_header.sseHeader = src_header.sseHeader
get_object_header.if_match = src_header.if_match
get_object_header.if_none_match = src_header.if_none_match
get_object_header.if_modified_since = src_header.if_modified_since
get_object_header.if_unmodified_since = src_header.if_unmodified_since
return get_object_header

def _download_part(self, part):
Expand All @@ -606,8 +613,8 @@ def _download_part(self, part):
else:
if 300 < resp.status < 500:
self._do_abort('errorCode:{0}, errorMessage:{1}'.format(resp.errorCode, resp.errorMessage))
self._exception.append(
'response from server is something wrong. ErrorCode:{0}, ErrorMessage:{1}'.format(
self._exception += (
'response from server is something wrong. ErrorCode:{0}, ErrorMessage:{1}\n'.format(
resp.errorCode, resp.errorMessage))
self.obsClient.log_client.log(
ERROR,
Expand Down
2 changes: 1 addition & 1 deletion src/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

setup(
name='esdk-obs-python',
version='3.20.9.1',
version='3.20.11',
packages=find_packages(),
zip_safe=False,
description='OBS Python SDK',
Expand Down

0 comments on commit b9936cd

Please sign in to comment.