egg-tencent-cloud-cos
v1.0.0
Published
[![NPM version][npm-image]][npm-url] [![build status][travis-image]][travis-url] [![Test coverage][codecov-image]][codecov-url] [![David deps][david-image]][david-url] [![Known Vulnerabilities][snyk-image]][snyk-url] [![npm download][download-image]][down
Downloads
2
Readme
egg-tencent-cloud-cos
Install
$ npm i egg-tencent-cloud-cos --save
Usage
// {app_root}/config/plugin.js
exports.tencentCloudCos = {
enable: true,
package: 'egg-tencent-cloud-cos',
};
Configuration
// {app_root}/config/config.default.js
exports.tencentCloudCos = {
client: {
// 用户的 SecretId
SecretId: 'xxxx21pSuAe9tStAPfv8Ypv8hjfk',
// 用户的 SecretKey
SecretKey: 'f8xxxUkqmphNsJblkX9ZoupY6diFtMdnlaEg',
defaultParams: {
// 默认使用的桶,在没有配置的情况下默认使用
Bucket: 'sh-miniprogram-1211135795',
// 默认使用的区域,在没有配置的情况下默认使用
Region: 'ap-guangzhou',
},
},
};
see config/config.default.js for more detail.
Example
this.app.tencentCloudCos.getBucket().then(res => {
console.log(res,'res')
})
Questions & Suggestions
Please open an issue here.