Interface: R2StorageConfig
Interface: R2StorageConfig
Section titled “Interface: R2StorageConfig”Defined in: server/src/storage/r2.ts:64
Properties
Section titled “Properties”bucket
Section titled “bucket”
readonlybucket: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.
readonlyoptionalid?:string
Defined in: server/src/storage/r2.ts:74
Stable identifier appearing in the Cache API key (default: “default”).
maxUploadBytes?
Section titled “maxUploadBytes?”
readonlyoptionalmaxUploadBytes?:number
Defined in: server/src/storage/r2.ts:76
Refuse upload with size above this value (default: 25 MiB).
readonlyoptionalmode?:"binding"
Defined in: server/src/storage/r2.ts:78
Binding mode is the only mode v0.3 implements; kept for forward compat.