diff --git a/helper.go b/helper.go index 3f6f25d..3ea4e4e 100644 --- a/helper.go +++ b/helper.go @@ -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") diff --git a/object_part.go b/object_part.go index 461d126..b080bcd 100644 --- a/object_part.go +++ b/object_part.go @@ -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 {