Skip to content

Commit 4c46823

Browse files
author
carsonxu
committed
分片上传支持 pic-operations 传递给 complete 接口
1 parent 3ff5e29 commit 4c46823

File tree

5 files changed

+8
-6
lines changed

5 files changed

+8
-6
lines changed

dist/cos-js-sdk-v5.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2161,7 +2161,7 @@ base.init(COS, task);
21612161
advance.init(COS, task);
21622162

21632163
COS.getAuthorization = util.getAuth;
2164-
COS.version = '1.1.2';
2164+
COS.version = '1.1.3';
21652165

21662166
module.exports = COS;
21672167

@@ -8364,7 +8364,8 @@ function sliceUploadFile(params, callback) {
83648364
ep.on('upload_slice_complete', function (UploadData) {
83658365
var metaHeaders = {};
83668366
util.each(params.Headers, function (val, k) {
8367-
if (k.toLowerCase().indexOf('x-cos-meta-') === 0) metaHeaders[k] = val;
8367+
var shortKey = k.toLowerCase();
8368+
if (shortKey.indexOf('x-cos-meta-') === 0 || shortKey === 'pic-operations') metaHeaders[k] = val;
83688369
});
83698370
uploadSliceComplete.call(self, {
83708371
Bucket: Bucket,

dist/cos-js-sdk-v5.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cos-js-sdk-v5",
3-
"version": "1.1.2",
3+
"version": "1.1.3",
44
"description": "JavaScript SDK for [腾讯云对象存储](https://cloud.tencent.com/product/cos)",
55
"main": "index.js",
66
"scripts": {

src/advance.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ function sliceUploadFile(params, callback) {
3636
ep.on('upload_slice_complete', function (UploadData) {
3737
var metaHeaders = {};
3838
util.each(params.Headers, function (val, k) {
39-
if (k.toLowerCase().indexOf('x-cos-meta-') === 0) metaHeaders[k] = val;
39+
var shortKey = k.toLowerCase();
40+
if (shortKey.indexOf('x-cos-meta-') === 0 || shortKey === 'pic-operations') metaHeaders[k] = val;
4041
});
4142
uploadSliceComplete.call(self, {
4243
Bucket: Bucket,

src/cos.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,6 @@ base.init(COS, task);
5959
advance.init(COS, task);
6060

6161
COS.getAuthorization = util.getAuth;
62-
COS.version = '1.1.2';
62+
COS.version = '1.1.3';
6363

6464
module.exports = COS;

0 commit comments

Comments
 (0)