/egg-cos2

腾讯云对象存储 cos 的 egg 包

Primary LanguageJavaScriptMIT LicenseMIT

egg-cos2

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

Install

$ npm i egg-cos2 --save

Usage

// {app_root}/config/plugin.js
exports.cos = {
  enable: true,
  package: 'egg-cos2',
};

Configuration

// {app_root}/config/config.default.js
exports.cos = {
  Bucket: '',
  Region: '',
  SecretId: '',
  SecretKey: '',
};

see config/config.default.js for more detail.

Example

this.app.cos2.putObject(/* ... */);

Questions & Suggestions

Please open an issue here.

License

MIT