Skip to content

Commit ae74133

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents db36ad1 + f7d35fd commit ae74133

File tree

3 files changed

+41
-1
lines changed

3 files changed

+41
-1
lines changed

CHANGELOG.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,36 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
99

10+
## [v2.10.10](https://github.com/tencentyun/cos-nodejs-sdk-v5/compare/v2.10.9...v2.10.10) - 2021-11-11
11+
12+
fix:修复uploadSliceItem
13+
14+
### Commits
15+
16+
- Updated CHANGELOG.md [`0d16b38`](https://github.com/tencentyun/cos-nodejs-sdk-v5/commit/0d16b385d8b32e989e02707bfc9727a9775a3e59)
17+
- fix:修复uploadSliceItem [`d21bd30`](https://github.com/tencentyun/cos-nodejs-sdk-v5/commit/d21bd30f20680578ae0a35f96a85ac4a9fe4e98a)
18+
19+
## [v2.10.9](https://github.com/tencentyun/cos-nodejs-sdk-v5/compare/v2.10.8...v2.10.9) - 2021-11-11
20+
21+
feat:分块上传支持mimeLimit,trafficLimit
22+
23+
### Commits
24+
25+
- feat:支持mimeLimit;trafficLimit [`9519347`](https://github.com/tencentyun/cos-nodejs-sdk-v5/commit/95193473e7d61b1a6cb99bda124189909087ac05)
26+
27+
## [v2.10.8](https://github.com/tencentyun/cos-nodejs-sdk-v5/compare/v2.10.7...v2.10.8) - 2021-11-10
28+
29+
### Merged
30+
31+
- upd: ci demo [`#115`](https://github.com/tencentyun/cos-nodejs-sdk-v5/pull/115)
32+
33+
### Commits
34+
35+
- Updated CHANGELOG.md [`3256b5c`](https://github.com/tencentyun/cos-nodejs-sdk-v5/commit/3256b5cd75659278dc1e4ffac991d0f23b6552d2)
36+
- 优化 getSignHost 方法,判断 ci/pic 域名 [`ce5378c`](https://github.com/tencentyun/cos-nodejs-sdk-v5/commit/ce5378c8aec80490b293b9af219f0d7857553b90)
37+
- 2.10.8 增加 ci demo [`58d224f`](https://github.com/tencentyun/cos-nodejs-sdk-v5/commit/58d224fb6522b459dbd179019c8bd0dc077b4136)
38+
- 2.10.7 增加 ci demo [`07c2c24`](https://github.com/tencentyun/cos-nodejs-sdk-v5/commit/07c2c2490817c9f91ee88de0b2588650276a901d)
39+
1040
## [v2.10.7](https://github.com/tencentyun/cos-nodejs-sdk-v5/compare/v2.10.6...v2.10.7) - 2021-11-09
1141

1242
fix:高级上传增加容错处理

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cos-nodejs-sdk-v5",
3-
"version": "2.10.8",
3+
"version": "2.10.10",
44
"description": "cos nodejs sdk v5",
55
"main": "index.js",
66
"types": "index.d.ts",

sdk/advance.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -577,6 +577,7 @@ function uploadSliceItem(params, callback) {
577577
var ServerSideEncryption = params.ServerSideEncryption;
578578
var UploadData = params.UploadData;
579579
var ChunkRetryTimes = self.options.ChunkRetryTimes + 1;
580+
var Headers = params.Headers || {};
580581

581582
var start = SliceSize * (PartNumber - 1);
582583

@@ -589,6 +590,14 @@ function uploadSliceItem(params, callback) {
589590
ContentLength = end - start;
590591
}
591592

593+
var headersWhiteList = ['x-cos-traffic-limit', 'x-cos-mime-limit'];
594+
var headers = {};
595+
util.each(Headers, function(v, k) {
596+
if (headersWhiteList.indexOf(k) > -1) {
597+
headers[k] = v;
598+
}
599+
});
600+
592601
util.fileSlice(FilePath, start, end, function (md5Body) {
593602
util.getFileMd5(md5Body, function (err, md5) {
594603
var contentMd5 = md5 ? util.binaryBase64(md5) : '';
@@ -606,6 +615,7 @@ function uploadSliceItem(params, callback) {
606615
UploadId: UploadData.UploadId,
607616
ServerSideEncryption: ServerSideEncryption,
608617
Body: Body,
618+
Headers: headers,
609619
onProgress: params.onProgress,
610620
ContentMD5: contentMd5,
611621
}, function (err, data) {

0 commit comments

Comments
 (0)