Saltar al contenido principal

Store files in Tencent Cloud COS

This guide explains how to store the uploaded files of Casdoor, such as avatars, in Tencent Cloud COS.


Learning outcomes​

  • Find the credentials and the bucket settings in Tencent Cloud.
  • Add Tencent Cloud COS as a storage provider in Casdoor.

What you need​

  • A Tencent Cloud account and a COS bucket
  • Administrator access to the Casdoor admin console

Find the values in Tencent Cloud​

  1. Copy the SecretId and the SecretKey from the API keys page.

    API keys in Tencent Cloud

  2. Copy the endpoint, the bucket name, and the region from the settings of the bucket.

    Bucket settings in COS

  3. Optionally, set up a CDN domain for the bucket. See COS CDN configuration.

Add the provider in Casdoor​

  1. In the Casdoor admin console, go to Identity > Providers and add a provider.

  2. Set Category to Storage and Type to Tencent Cloud COS.

  3. Fill in the fields:

    Casdoor fieldTencent CloudObligatorio
    Client IDSecretIdSí
    Client secretSecretKeySí
    EndpointEndpointSí
    BucketBucketNameSí
    Region IDRegionSí
    Path prefix—No
    DominioCDN domainNo

    Tencent Cloud COS provider in Casdoor

  4. Save the provider.

See also​