fix:doPut error (#2495)

pull/2548/head
qinguoyi 4 months ago committed by GitHub
parent f44a97b8d2
commit a559bfe323
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -234,7 +234,7 @@ func (m *Manage) RunTask(ctx context.Context, task Task) (string, error) {
} }
for i, currentPartSize := range part.PartSizes { for i, currentPartSize := range part.PartSizes {
md5Reader := NewMd5Reader(io.LimitReader(reader, currentPartSize)) md5Reader := NewMd5Reader(io.LimitReader(reader, currentPartSize))
if m.doPut(ctx, m.api.Client, initiateMultipartUploadResp.Upload.Sign, uploadParts[i], md5Reader, currentPartSize); err != nil { if err := m.doPut(ctx, m.api.Client, initiateMultipartUploadResp.Upload.Sign, uploadParts[i], md5Reader, currentPartSize); err != nil {
return "", err return "", err
} }
if md5val := md5Reader.Md5(); md5val != part.PartMd5s[i] { if md5val := md5Reader.Md5(); md5val != part.PartMd5s[i] {

Loading…
Cancel
Save