Skip to content

Commit 35a191e

Browse files
author
cappyzawa
committed
considered the minimum size for upload part
Signed-off-by: cappyzawa <[email protected]>
1 parent 8474109 commit 35a191e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

s3client.go

+3
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,9 @@ func (client *s3client) UploadFile(bucketName string, remotePath string, localPa
200200
uploader.MaxUploadParts = 1
201201
uploader.Concurrency = 1
202202
uploader.PartSize = fSize + 1
203+
if fSize <= s3manager.MinUploadPartSize {
204+
uploader.PartSize = s3manager.MinUploadPartSize
205+
}
203206
}
204207

205208
progress := client.newProgressBar(fSize)

0 commit comments

Comments
 (0)