Skip to content

Commit

Permalink
getSTS demo
Browse files Browse the repository at this point in the history
  • Loading branch information
carsonxu committed Jan 30, 2018
1 parent 1e7212c commit 08fbe71
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions demo/demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,18 @@ var getAuthorization = function (options, callback) {

};

var getSTS = function (params, callback) {
callback({
SecretId: 'xxx',
SecretKey: 'xxx',
XCosSecurityToken: 'xxx',
});
};

var cos = new COS({
// 必选参数
getAuthorization: getAuthorization,
// getSTS: getSTS, // 支持使用临时密钥
// 可选参数
FileParallelLimit: 3, // 控制文件上传并发数
ChunkParallelLimit: 3, // 控制单个文件下分片上传并发数
Expand Down

0 comments on commit 08fbe71

Please sign in to comment.