ServeOptions
ServeOptions =
object
Defined in: packages/storage/src/types.ts:201
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.
Properties
Section titled “Properties”env:
Record<string,unknown>
Defined in: packages/storage/src/types.ts:203
Workers environment bindings (must include the target R2 bucket).
headers?
Section titled “headers?”
optionalheaders:Record<string,string>
Defined in: packages/storage/src/types.ts:205
Additional response headers to include (e.g. Cache-Control).