Store files in Google Cloud Storage
This guide explains how to store the uploaded files of Casdoor, such as avatars, in Google Cloud Storage.
Learning outcomes
- Create a service account key with access to the bucket.
- Add Google Cloud Storage as a storage provider in Casdoor.
What you need
- A Google Cloud project with a Cloud Storage bucket
- Administrator access to the Casdoor admin console
Create a service account key
- Create a service account and grant it IAM permissions on the bucket. See Authentication for Cloud Storage.
- Create a key for the service account and download it as a JSON file.
Add the provider in Casdoor
-
In the Casdoor admin console, go to Identity > Providers and add a provider.
-
Set Category to
Storageand Type toGoogle Cloud Storage. -
Fill in the fields:
字段 GCP 对应项 / 含义 必需 Service Account JSON 服务账号密钥(JSON 内容) Yes Endpoint 接入地址(可选) 不 Bucket Bucket name 是 
-
Save the provider.