Skip to content

ServeOptions

ServeOptions = object

Defined in: packages/storage/src/types.ts:301

Options for serving a file directly from R2 as an HTTP response.

The resulting Response streams the file body and includes R2 HTTP metadata (content-type, etag, etc.) plus any additional headers you specify.

env: Record<string, unknown>

Defined in: packages/storage/src/types.ts:303

Workers environment bindings (must include the target R2 bucket).


optional headers: Record<string, string>

Defined in: packages/storage/src/types.ts:305

Additional response headers to include (e.g. Cache-Control).