Skip to content

Commit e797176

Browse files
authored
Merge pull request #131 from cappyzawa/fix/multipart
Fix upload part size when `disable_multipart` is set
2 parents 8474109 + 35a191e commit e797176

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)