Skip to content

Commit

Permalink
fix: _ UploadPart opt.headers does not use es6 (#1248)
Browse files Browse the repository at this point in the history
* fix: _uploadPart opt.headers use copy

* fix: _uploadPart opt.headers use copy

---------

Co-authored-by: csg01123119 <csg01123119@alibaba-inc.com>
  • Loading branch information
shungang and csg01123119 authored Sep 6, 2023
1 parent 2bdd51b commit e2872a0
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lib/common/multipart.js
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
Expand Down

0 comments on commit e2872a0

Please sign in to comment.