0.0.1 • Published 10 months ago

strapi-provider-tencent-cos v0.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
10 months ago

Strapi Provider Tencent COS

This package is designed to provide Strapi CMS with the ability to upload to Tencent Cloud Object Storage, basic upload and download functions have been implemented so far.

Installation

// Using NPM
npm install strapi-provider-tencent-cos --save

// Using Yarn
yarn add strapi-provider-tencent-cos

Configuration (required)

This reference is still in development and updateing.

You can choose a string or call an environment variable (the following only provides a reference for environment variables)

// ./config/plugins.js

module.exports = ({ env }) => ({

  // ...
  upload: {
    config: {
      provider: "strapi-provider-tencent-cos",
      providerOptions: {
        auth: {
          secretId: env("COS_SECRET_ID"),
          secretKey: env("COS_SECRET_KEY"),
        },
        storage: {
          region: env("COS_REGION"),
          bucket: env("COS_BUCKET"),
          basePath: env("COS_BASE_PATH"),
          baseLink: env("COS_BASE_LINK"),
        },
      },
    },
  },
  // ...

});