Skip to content

UploadFieldMetadata

UploadFieldMetadata = object

Defined in: packages/forms/src/types.ts:60

Metadata describing how a column should render as a file upload field.

Attached to a Drizzle column via the upload() helper. The metadata is read back during introspectTable so the AutoForm renderer can pick the upload component (and pass through the storage filetype + basePath + multiplicity hints).

The Drizzle column itself stays a plain text (or text[] for multiple) — @cfast/forms does not invent a new column type, it just stores the upload metadata as a Symbol-keyed entry on the column config so the rest of the framework keeps working unchanged.

optional accept: string

Defined in: packages/forms/src/types.ts:70

Comma-separated MIME accept string forwarded to the file picker.


optional basePath: string

Defined in: packages/forms/src/types.ts:64

Mount path of the storage routes. Defaults to "/uploads".


filetype: string

Defined in: packages/forms/src/types.ts:62

Storage filetype name registered in defineStorage.


optional maxFiles: number

Defined in: packages/forms/src/types.ts:68

Maximum number of files (only relevant when multiple is true).


optional maxSize: number

Defined in: packages/forms/src/types.ts:72

Optional client-side max byte size hint.


optional multiple: boolean

Defined in: packages/forms/src/types.ts:66

Whether the column accepts multiple file keys. Defaults to false.