Skip to content

Interface: R2StorageConfig

Defined in: server/src/storage/r2.ts:64

readonly bucket: unknown

Defined in: server/src/storage/r2.ts:72

The R2 binding from your Worker env. Typed as unknown so a real R2Bucket (whose get overloads TypeScript refuses to structurally assign to any narrower interface) passes without a cast at the call site. The head / get / put / delete surface the adapter actually calls is a proper subset of R2Bucket, so runtime behavior is safe.


readonly optional id?: string

Defined in: server/src/storage/r2.ts:74

Stable identifier appearing in the Cache API key (default: “default”).


readonly optional maxUploadBytes?: number

Defined in: server/src/storage/r2.ts:76

Refuse upload with size above this value (default: 25 MiB).


readonly optional mode?: "binding"

Defined in: server/src/storage/r2.ts:78

Binding mode is the only mode v0.3 implements; kept for forward compat.