Package Exports
- cos-nodejs-sdk-v5
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (cos-nodejs-sdk-v5) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
cos-nodejs-sdk-v5
腾讯云 COS Nodejs SDK(XML API)
install
npm i cos-nodejs-sdk-v5 --savedemo
// 引入模块
var COS = require('cos-nodejs-sdk-v5');
// 创建实例
var cos = new COS({
SecretId: 'AKIDxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
SecretKey: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
});
// 分片上传
cos.sliceUploadFile({
Bucket: 'test-1250000000', // Bucket 格式:test-1250000000
Region: 'ap-guangzhou',
Key: '1.zip',
FilePath: './1.zip'
}, function (err, data) {
console.log(err, data);
});