egg-tencent-cloud-cos

1.0.0 • Public • Published

egg-tencent-cloud-cos

NPM version build status Test coverage David deps Known Vulnerabilities npm download

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.

License

MIT

Package Sidebar

Install

npm i egg-tencent-cloud-cos

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

13.2 kB

Total Files

7

Last publish

Collaborators

  • sothx