Skip to content

Commit

Permalink
Merge pull request #254 from tencentyun/feature_jojoliang_2dababd3
Browse files Browse the repository at this point in the history
Feature jojoliang 2dababd3
  • Loading branch information
agin719 committed May 22, 2024
2 parents 36360c1 + 9992cbb commit 662bdca
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ func IsLenReader(reader io.Reader) bool {

func CheckReaderLen(reader io.Reader) error {
nlen, err := GetReaderLen(reader)
if err != nil || nlen < singleUploadMaxLength {
if err != nil || nlen <= singleUploadMaxLength {
return nil
}
return errors.New("The single object size you upload can not be larger than 5GB")
Expand Down
2 changes: 1 addition & 1 deletion object_part.go
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ func (s *ObjectService) MultiCopy(ctx context.Context, name string, sourceURL st
if err != nil {
return nil, nil, err
}
if partNum == 0 || (totalBytes < singleUploadMaxLength && !opt.useMulti) {
if partNum == 0 || (totalBytes <= singleUploadMaxLength && !opt.useMulti) {
if len(id) > 0 {
return s.Copy(ctx, name, sourceURL, opt.OptCopy, id[0])
} else {
Expand Down

0 comments on commit 662bdca

Please sign in to comment.