Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass Content-Length in InitMultipartUpload #1095

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion S3/MultiPart.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down