Skip to content

Commit

Permalink
fix part size value appropriately in upload_snowball_objects() API (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
erwin-vanduijnhoven authored Nov 21, 2023
1 parent b8ecf63 commit c3317be
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions minio/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -2775,15 +2775,17 @@ def upload_snowball_objects(self, bucket_name, object_list, metadata=None,
else:
length = os.stat(name).st_size

part_size = 0 if length < MIN_PART_SIZE else length

if name:
return self.fput_object(bucket_name, object_name, staging_filename,
metadata=metadata, sse=sse,
tags=tags, retention=retention,
legal_hold=legal_hold, part_size=length)
legal_hold=legal_hold, part_size=part_size)
return self.put_object(bucket_name, object_name, fileobj,
length, metadata=metadata, sse=sse,
tags=tags, retention=retention,
legal_hold=legal_hold, part_size=length)
legal_hold=legal_hold, part_size=part_size)

def _list_objects( # pylint: disable=too-many-arguments,too-many-branches
self,
Expand Down

0 comments on commit c3317be

Please sign in to comment.