Skip to content

Commit b91b9e9

Browse files
committed
fix: update readme
1 parent dfc08e3 commit b91b9e9

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,16 @@ const Bucket = 'test-1250000000';
3838
// 关于地域的详情见 https://cloud.tencent.com/document/product/436/6224
3939
const Region = 'ap-guangzhou';
4040
41-
// 初始化实例
41+
// 初始化实例,详情参考:https://cloud.tencent.com/document/product/436/11459
42+
43+
// 1、方式一:传入临时密钥
44+
const cos = new COS({
45+
SecretId: 'your_tmpSecretId',
46+
SecretKey: 'your_tmpSecretKey',
47+
SecurityToken: 'your_sessionToken',
48+
});
49+
50+
// 2、方式二:传入获取临时密钥回调
4251
const cos = new COS({
4352
// getAuthorization 必选参数
4453
getAuthorization: function (options, callback) {

0 commit comments

Comments
 (0)