0.1.0 • Published 3 years ago

tencent-oss v0.1.0

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

my-tencent-oss

Egg's tencent-oss plugin.

Install

$ npm i tencent-oss --save

Configuration

Change {app_root}/config/plugin.js to enable my-tencent-oss plugin:

exports.tencentOss = {
  enable: true,
  package: 'my-tencent-oss',
};

Config

// {app_root}/config/config.default.js
  config.tencentOss = {
    clients: {
      cos1: {
        credential: {
          SecretId: '',
          SecretKey: ''
        }
      },
      cos2: {
        sts: {
          clientConfig: {
            credential: {
              secretId: 'AKIDd4FBsKHgeP1PcaEkxyjETSCgusd8NxJQ',
              secretKey: '1nKhogIeldGdp69xXsypQ1Tm1YFk02qP'
            },
            region: "ap-guangzhou",
            profile: {
              httpProfile: {
                endpoint: "sts.tencentcloudapi.com",
              },
            },
          },
          "Name": "access",
          Policy: {
            "version": "2.0",
            "statement": [
              {
                "effect": "allow",
                "action": [
                  "cos:PutObject",
                  "cos:GetObject",
                  "cos:HeadObject",
                  "cos:OptionsObject",
                  "cos:ListParts",
                  "cos:GetObjectTagging"
                ],
                "resource": "*"
              }
            ]
          }
        }
      }
    }
  };

Questions & Suggestions

Please open an issue here.

License

MIT

0.1.0

3 years ago

0.0.3

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago