Skip to content

Commit 662bdca

Browse files
authored
Merge pull request #254 from tencentyun/feature_jojoliang_2dababd3
Feature jojoliang 2dababd3
2 parents 36360c1 + 9992cbb commit 662bdca

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

helper.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ func IsLenReader(reader io.Reader) bool {
181181

182182
func CheckReaderLen(reader io.Reader) error {
183183
nlen, err := GetReaderLen(reader)
184-
if err != nil || nlen < singleUploadMaxLength {
184+
if err != nil || nlen <= singleUploadMaxLength {
185185
return nil
186186
}
187187
return errors.New("The single object size you upload can not be larger than 5GB")

object_part.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,7 @@ func (s *ObjectService) MultiCopy(ctx context.Context, name string, sourceURL st
536536
if err != nil {
537537
return nil, nil, err
538538
}
539-
if partNum == 0 || (totalBytes < singleUploadMaxLength && !opt.useMulti) {
539+
if partNum == 0 || (totalBytes <= singleUploadMaxLength && !opt.useMulti) {
540540
if len(id) > 0 {
541541
return s.Copy(ctx, name, sourceURL, opt.OptCopy, id[0])
542542
} else {

0 commit comments

Comments
 (0)