Skip to main content

Cloud Storage

CloudBase Cloud Storage provides stable, secure, low-cost, and easy-to-use cloud storage services, supporting any quantity and form of unstructured data storage — images, documents, audio, video, files, etc. It is backed by Tencent Cloud COS (Object Storage) and integrates CDN acceleration, Cloud Infinite (CI), content moderation, and more.

Two cloud storage modes

Cloud storage comes in two flavors: classic and PG, determined by your environment type.

DimensionClassic cloud storagePG cloud storage
Applicable environmentClassic environments (default)PG environments
Bucket conceptTightly bound to the environment, mainly a path prefixA row in storage.buckets; per-bucket SQL-level configuration
Permission modelBuilt-in modes (READONLY / PRIVATE, ...) + JSON security rulesPostgreSQL RLS policies (SQL)
Upload pathClient SDK gets a signature and uploads directly to COSClient → Storage API → COS; metadata and object coordinated in one transaction
MetadataBackfilled by the applicationWritten automatically by Storage API into storage.objects, queryable via SQL
How it is selectedDefault when creating an environmentChoose PostgreSQL when creating an environment
Reading guide

The rest of this page focuses on classic mode. If you are using a PG environment, jump directly to PG Cloud Storage.

Management methods

CloudBase cloud storage provides multiple management methods. Pick the one that fits your scenario:

MethodFeaturesUse casesStrengths
ConsoleVisual UI for permissions and cache settingsDay-to-day managementEasy to pick up, visual
SDKIntegrated into applicationsApp integrationHighly flexible and customizable
CLICommand-line, batch friendlyAutomation / batchEfficient batch ops; good for CI/CD
cosBrowserVisual UI with batchFrequent file managementCombines visual UX with batch efficiency
HTTP APIStandard RESTful APIServer-side / cross-languageCross-language, callable from any backend

For example: SDK during development, CLI during Ops, console or cosBrowser for daily admin, HTTP API for cross-language backend integrations.

Main features

CDN acceleration by default

Cloud storage supports CDN acceleration out of the box, with a free CDN domain. CDN delivers content from the node closest to the user, reducing latency.

Authentication integration

CloudBase cloud storage seamlessly integrates with CloudBase auth. You can use user identity together with security rules to control access — e.g. files only readable by signed-in users, or restricted to WeChat-authenticated users.

Under PG mode, authentication and permissions are jointly handled by PostgreSQL's auth schema and RLS policies. See PG Cloud Storage — Permission management.

High extensibility

CloudBase cloud storage works well with other CloudBase services:

  • Store a file's fileID in the database
  • Combine with CloudBase extensions: image moderation, processing, tagging, blind watermarking, etc.

HTTP API

Cloud storage exposes complete RESTful HTTP APIs, callable from any backend language: