From 6ffd3cf5ab21880e3db42503d2586653f0f02734 Mon Sep 17 00:00:00 2001 From: chrisftian Date: Thu, 11 Nov 2021 16:00:22 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E4=BF=AE=E5=A4=8DuploadSliceItem?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- demo-album/lib/cos-wx-sdk-v5.js | 3 ++- demo/lib/cos-wx-sdk-v5.js | 3 ++- package.json | 2 +- src/advance.js | 1 + src/cos.js | 2 +- 5 files changed, 7 insertions(+), 4 deletions(-) diff --git a/demo-album/lib/cos-wx-sdk-v5.js b/demo-album/lib/cos-wx-sdk-v5.js index 2038a26..f6be7ef 100644 --- a/demo-album/lib/cos-wx-sdk-v5.js +++ b/demo-album/lib/cos-wx-sdk-v5.js @@ -2339,7 +2339,7 @@ base.init(COS, task); advance.init(COS, task); COS.getAuthorization = util.getAuth; -COS.version = '1.0.12'; +COS.version = '1.0.13'; module.exports = COS; @@ -9673,6 +9673,7 @@ function uploadSliceItem(params, callback) { var ServerSideEncryption = params.ServerSideEncryption; var UploadData = params.UploadData; var ChunkRetryTimes = self.options.ChunkRetryTimes + 1; + var Headers = params.Headers || {}; var start = SliceSize * (PartNumber - 1); diff --git a/demo/lib/cos-wx-sdk-v5.js b/demo/lib/cos-wx-sdk-v5.js index 2038a26..f6be7ef 100644 --- a/demo/lib/cos-wx-sdk-v5.js +++ b/demo/lib/cos-wx-sdk-v5.js @@ -2339,7 +2339,7 @@ base.init(COS, task); advance.init(COS, task); COS.getAuthorization = util.getAuth; -COS.version = '1.0.12'; +COS.version = '1.0.13'; module.exports = COS; @@ -9673,6 +9673,7 @@ function uploadSliceItem(params, callback) { var ServerSideEncryption = params.ServerSideEncryption; var UploadData = params.UploadData; var ChunkRetryTimes = self.options.ChunkRetryTimes + 1; + var Headers = params.Headers || {}; var start = SliceSize * (PartNumber - 1); diff --git a/package.json b/package.json index 7e0f8db..593001e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cos-wx-sdk-v5", - "version": "1.0.12", + "version": "1.0.13", "description": "小程序 SDK for [腾讯云对象存储服务](https://cloud.tencent.com/product/cos)", "main": "demo/lib/cos-wx-sdk-v5.js", "scripts": { diff --git a/src/advance.js b/src/advance.js index 4d26e02..34aa861 100644 --- a/src/advance.js +++ b/src/advance.js @@ -587,6 +587,7 @@ function uploadSliceItem(params, callback) { var ServerSideEncryption = params.ServerSideEncryption; var UploadData = params.UploadData; var ChunkRetryTimes = self.options.ChunkRetryTimes + 1; + var Headers = params.Headers || {}; var start = SliceSize * (PartNumber - 1); diff --git a/src/cos.js b/src/cos.js index 3809a52..7c7de0b 100644 --- a/src/cos.js +++ b/src/cos.js @@ -57,6 +57,6 @@ base.init(COS, task); advance.init(COS, task); COS.getAuthorization = util.getAuth; -COS.version = '1.0.12'; +COS.version = '1.0.13'; module.exports = COS;