Skip to content

Storage overview

Comwit Storage is a project-owned object bucket backed by Cloudflare R2. You create it as its own resource, then connect any server-side application that speaks the S3 API. You do not install a Comwit-specific storage package.

One Storage resource has four important values:

ValuePurpose
storage_idStable Comwit resource id, such as stg_6f9a…
bucketExact globally unique S3 bucket name you selected
endpointAuthenticated S3 endpoint: https://storage.cloud.comwit.io
public_base_urlOptional direct public object URL under *.comwit.link

Storage has two deliberately separate paths.

Create/configure:
CLI, console, or JSON API -> platform-api -> Comwit Storage resource + R2
Private object traffic:
server-side S3 client -> storage.cloud.comwit.io -> authenticated gateway -> R2
Private browser transfer:
app server -> platform-api presign -> browser -> R2 (provider CORS)
Public object traffic:
browser -> stg-*.comwit.link -> Cloudflare Cache -> R2

Creating or deleting a bucket and enabling public delivery are control-plane operations. Uploading, downloading, listing, and multipart operations use a normal S3 client. Public reads bypass the S3 gateway and Comwit runtime.

Use the existing Comwit token classes:

  • cwt_ personal token for local tools and developer automation;
  • cwp_ project token for a deployed service.

Read/list/head operations require storage:read. Object mutations and Storage lifecycle changes require storage:write. There is no separate cws_ token and Comwit never gives an application Cloudflare credentials.

The gateway accepts the S3 operations supported by the backing R2 compatibility surface, including normal object reads/writes and multipart uploads. It does not promise every AWS-only S3 feature. Bucket creation and deletion remain Comwit resource operations, and ListBuckets is filtered to the caller’s authorized projects.