Skip to content

Commit

Permalink
feat: update version 2.12.5
Browse files Browse the repository at this point in the history
  • Loading branch information
livehigh committed Oct 24, 2023
1 parent 4251b30 commit 9548590
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
26 changes: 15 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

## install

[npm 地址](https://www.npmjs.com/package/cos-nodejs-sdk-v5)
[npm 地址](https://www.npmjs.com/package/cos-nodejs-sdk-v5)

```
npm i cos-nodejs-sdk-v5 --save
```
Expand All @@ -19,28 +19,32 @@ npm i cos-nodejs-sdk-v5 --save
var COS = require('cos-nodejs-sdk-v5');
// 创建实例
var cos = new COS({
SecretId: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
SecretKey: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
SecretId: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
SecretKey: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
});

// 存储桶名称,由bucketname-appid 组成,appid必须填入,可以在COS控制台查看存储桶名称。 https://console.cloud.tencent.com/cos5/bucket
var Bucket = 'test-1250000000';
// 存储桶Region可以在COS控制台指定存储桶的概览页查看 https://console.cloud.tencent.com/cos5/bucket/
// 存储桶Region可以在COS控制台指定存储桶的概览页查看 https://console.cloud.tencent.com/cos5/bucket/
// 关于地域的详情见 https://cloud.tencent.com/document/product/436/6224
var Region = 'ap-guangzhou';

// 分片上传
cos.sliceUploadFile({
// 高级上传
cos.uploadFile(
{
Bucket: Bucket,
Region: Region,
Key: '1.zip',
FilePath: './1.zip' // 本地文件地址,需自行替换
}, function (err, data) {
FilePath: './1.zip', // 本地文件地址,需自行替换
SliceSize: 1024 * 1024 * 5, // 触发分块上传的阈值,超过5MB使用分块上传,非必须
},
function (err, data) {
console.log(err, data);
});
}
);
```

## 说明文档
## 说明文档

[使用例子](demo/demo.js)

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cos-nodejs-sdk-v5",
"version": "2.12.4",
"version": "2.12.5",
"description": "cos nodejs sdk v5",
"main": "index.js",
"types": "index.d.ts",
Expand Down

0 comments on commit 9548590

Please sign in to comment.