Skip to content

Commit

Permalink
fix: _uploadPart opt.headers use copy
Browse files Browse the repository at this point in the history
  • Loading branch information
csg01123119 committed Sep 6, 2023
1 parent 2bdd51b commit d9f7faf
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
};
copy({ 'Content-Length': data.size }).to(opt.headers);

// 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 d9f7faf

Please sign in to comment.