Skip to content

Commit

Permalink
Merge pull request #131 from cappyzawa/fix/multipart
Browse files Browse the repository at this point in the history
Fix upload part size when `disable_multipart` is set
  • Loading branch information
vito authored Jul 11, 2019
2 parents 8474109 + 35a191e commit e797176
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions s3client.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,9 @@ func (client *s3client) UploadFile(bucketName string, remotePath string, localPa
uploader.MaxUploadParts = 1
uploader.Concurrency = 1
uploader.PartSize = fSize + 1
if fSize <= s3manager.MinUploadPartSize {
uploader.PartSize = s3manager.MinUploadPartSize
}
}

progress := client.newProgressBar(fSize)
Expand Down

0 comments on commit e797176

Please sign in to comment.