Skip to content

Commit 41e5d7e

Browse files
author
dfounderliu
committed
fix: cos temp_id
1 parent 8a993c7 commit 41e5d7e

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "tencent-component-toolkit",
3-
"version": "1.0.9",
3+
"version": "1.0.10",
44
"description": "Tencent component toolkit",
55
"main": "src/index.js",
66
"scripts": {

src/baas/cos/index.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ class Cos {
99
constructor(credentials = {}, region = 'ap-guangzhou') {
1010
this.region = region
1111
this.credentials = credentials
12+
if(credentials.token){
13+
this.credentials.XCosSecurityToken = credentials.token
14+
}
15+
if(credentials.Token){
16+
this.credentials.XCosSecurityToken = credentials.Token
17+
}
1218
this.cosClient = new cos(this.credentials)
1319
}
1420

0 commit comments

Comments
 (0)