upload-stuff

Core types

Source-generated reference for shared core types.

@upload-stuff/core holds the types shared across the server and client packages. You rarely import it directly — the server and client re-export the types you need — but this is the canonical reference for them. Tables are generated from the package source, so they match the shipped API.

Custom fields

FieldType

"string" | "number" | "boolean" — the value types a custom field may declare.

FieldAttributes

Prop

Type

FieldsDeclaration

Record<string, FieldAttributes> — the instance's central custom-column declaration, keyed by field name. Declared once on UploadStuff({ fields }); a route then supplies values through .fields(resolver), and the resolved values are typed by InferFieldValues.

Route configuration

RouteConfig

The per-route upload config you write on the server.

Prop

Type

PerTypeConfig

Per-MIME-type constraints within a route's files config.

Prop

Type

NormalizedRouteConfig

The normalized shape the engine and client operate on, derived from RouteConfig.

Prop

Type

Upload results

InitUploadResult

Prop

Type

CompleteUploadResult

Prop

Type

UploadedFileData

Prop

Type

ToUploadFileData

Prop

Type

Adapter contracts

The interfaces custom storage and database adapters implement. See Custom database for writing your own database adapter.

StorageAdapter

Prop

Type

DatabaseAdapter

Prop

Type

UploadStuffConfig

The full resolved config an UploadStuff instance is built from.

Prop

Type

On this page