From b91b9e9d49521e521583c6e0925a02ada4930193 Mon Sep 17 00:00:00 2001 From: chrisftian Date: Mon, 8 Jul 2024 12:05:58 +0800 Subject: [PATCH] fix: update readme --- README.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6dafc02..130d623 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,16 @@ const Bucket = 'test-1250000000'; // 关于地域的详情见 https://cloud.tencent.com/document/product/436/6224 const Region = 'ap-guangzhou'; -// 初始化实例 +// 初始化实例,详情参考:https://cloud.tencent.com/document/product/436/11459 + +// 1、方式一:传入临时密钥 +const cos = new COS({ + SecretId: 'your_tmpSecretId', + SecretKey: 'your_tmpSecretKey', + SecurityToken: 'your_sessionToken', +}); + +// 2、方式二:传入获取临时密钥回调 const cos = new COS({ // getAuthorization 必选参数 getAuthorization: function (options, callback) {