Skip to content

Commit

Permalink
Fix multipart upload.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jordan Vance committed Feb 23, 2024
1 parent 8d5b515 commit ae39193
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions requirements.txt
Expand Up @@ -10,9 +10,9 @@
#
# Moto v5 is incompatible with current mocks3 implementation

moto[server]==4.2.10
moto[server]==4.2.14

boto3==1.34.29
boto3==1.34.48
flask_cors==4.0.0
pytz==2023.4

Expand Down
6 changes: 3 additions & 3 deletions src/shoobx/mocks3/models.py
Expand Up @@ -467,7 +467,7 @@ def complete(self, body):

etag = hashlib.md5()
etag.update(bytes(md5s))
return total, f"{etag.hexdigest()}-{count}"
return total, f"{etag.hexdigest()}-{count}", None

def get_part(self, part_id):
part = Part(self, part_id)
Expand Down Expand Up @@ -783,8 +783,8 @@ def create_multipart_upload(
def complete_multipart_upload(self, bucket_name, multipart_id, body):
bucket = self.get_bucket(bucket_name)
multipart = bucket.multiparts[multipart_id]
value, etag = multipart.complete(body)
return multipart, value, etag
value, etag, checksum = multipart.complete(body)
return multipart, value, etag, checksum

def reset(self):
# For every key and multipart, Moto opens a TemporaryFile to write the value of
Expand Down

0 comments on commit ae39193

Please sign in to comment.