From 29884e8626c2af72b51a3df0b2c51d0d888fbbcb Mon Sep 17 00:00:00 2001 From: jojoliang Date: Wed, 22 May 2024 19:47:26 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=9B=B4=E6=96=B0MultiCopy?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- object_part.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 { From 9992cbb1853c2b260522d4f078cd6372dababd3f Mon Sep 17 00:00:00 2001 From: jojoliang Date: Wed, 22 May 2024 21:15:29 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E7=AE=80=E5=8D=95=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E5=85=81=E8=AE=B8=E4=B8=8A=E4=BC=A0=E5=88=9A=E5=A5=BD5GB?= =?UTF-8?q?=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- helper.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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")