Skip to content

HandleContext

HandleContext<TInput> = object

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

Context required by the upload handler and lifecycle hooks.

Passed to StorageInstance.handle to provide access to env bindings, the authenticated user, and optional caller-provided input.

TInput = Record<string, unknown>

The shape of caller-provided input data.

env: Record<string, unknown>

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

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


optional input: TInput

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

Optional caller-provided input available in the key function and hooks.


user: object

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

The authenticated user performing the upload.

[key: string]: unknown

id: string