Skip to content

Commit ea347ab

Browse files
authored
Merge pull request #39 from dt3310321/s3
Add EnableMD5 for upload_part
2 parents 557076c + 547f1bf commit ea347ab

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

qcloud_cos/cos_client.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -598,10 +598,6 @@ def upload_part(self, Bucket, Key, Body, PartNumber, UploadId, EnableMD5=False,
598598
auth=CosS3Auth(self._conf._secret_id, self._conf._secret_key, Key),
599599
data=Body)
600600
response = dict()
601-
logger.debug("local md5: {key}".format(key=rt.headers['ETag'][1:-1]))
602-
logger.debug("cos md5: {key}".format(key=md5(Body).hexdigest()))
603-
if md5(Body).hexdigest() != rt.headers['ETag'][1:-1]:
604-
raise CosClientError("MD5 inconsistencies")
605601
response['ETag'] = rt.headers['ETag']
606602
return response
607603

0 commit comments

Comments
 (0)