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: PG and classic, determined by your environment type.
| Dimension | PG cloud storage | Classic cloud storage |
|---|---|---|
| Applicable environment | PG environments (default) | Classic environments |
| Bucket concept | A row in storage.buckets; per-bucket SQL-level configuration | Tightly bound to the environment, mainly a path prefix |
| Permission model | PostgreSQL RLS policies (SQL) | Built-in modes (READONLY / PRIVATE, ...) + JSON security rules |
| Upload path | Client → Storage API → COS; metadata and object coordinated in one transaction | Client SDK gets a signature and uploads directly to COS |
| Metadata | Written automatically by Storage API into storage.objects, queryable via SQL | Backfilled by the application |
| How it is selected | Choose PostgreSQL when creating an environment | Create an environment without PostgreSQL |
- PG mode: PG Cloud Storage, plus "File Management" and "Permissions and Security" on the left
- Classic mode: the "Classic mode (not available in PG mode)" group on the left (Console / SDK / Basic permissions / Security rules)
- CDN / content moderation / image processing: shared by both modes — see the "Advanced Features" and "Data Processing and Content Safety" groups on the left
The "Management methods" section below covers classic mode; on a PG environment, go straight to PG Cloud Storage.
Management methods (classic mode)
CloudBase cloud storage provides multiple management methods. Pick the one that fits your scenario:
| Method | Features | Use cases | Strengths |
|---|---|---|---|
| Console | Visual UI for permissions and cache settings | Day-to-day management | Easy to pick up, visual |
| SDK | Integrated into applications | App integration | Highly flexible and customizable |
| CLI | Command-line, batch friendly | Automation / batch | Efficient batch ops; good for CI/CD |
| cosBrowser | Visual UI with batch | Frequent file management | Combines visual UX with batch efficiency |
| HTTP API | Standard RESTful API | Server-side / cross-language | Cross-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:
- Classic-mode HTTP API: object upload / download / delete / copy, etc.
- Postgres-Native HTTP API: full bucket / object CRUD, signed URLs, object metadata, multipart upload, gated by RLS.