diff --git a/S3/MultiPart.py b/S3/MultiPart.py index 81554e603..da3b0ea4a 100644 --- a/S3/MultiPart.py +++ b/S3/MultiPart.py @@ -18,7 +18,7 @@ class MultiPartUpload(object): """Supports MultiPartUpload and MultiPartUpload(Copy) operation""" - MIN_CHUNK_SIZE_MB = 5 # 5MB + MIN_CHUNK_SIZE_MB = 5 # 5MB MAX_CHUNK_SIZE_MB = 5 * 1024 # 5GB MAX_FILE_SIZE = 5 * 1024 * 1024 # 5TB @@ -32,6 +32,10 @@ def __init__(self, s3, src, dst_uri, headers_baseline=None, self.parts = {} self.headers_baseline = headers_baseline or {} + # if the src_size is specified, set the multipart-object-size extended attribute + if src_size != None: + self.headers_baseline['x-multipart-object-size'] = str(self.src_size) + if isinstance(src, S3UriS3): # Source is the uri of an object to s3-to-s3 copy with multipart. self.src_uri = src