diff --git a/lib/common/multipart.js b/lib/common/multipart.js index f9a798666..b6cb1edb1 100644 --- a/lib/common/multipart.js +++ b/lib/common/multipart.js @@ -236,10 +236,7 @@ proto._uploadPart = async function _uploadPart(name, uploadId, partNo, data, opt const opt = {}; copy(options).to(opt); opt.headers = opt.headers || {}; - opt.headers = { - ...opt.headers, - 'Content-Length': data.size - }; + opt.headers['Content-Length'] = data.size; // Uploading shards does not require x-oss server side encryption opt.headers = omit(opt.headers, ['x-oss-server-side-encryption']);