Skip to content

FileFieldModel

FileFieldModel = object

Defined in: packages/schema/src/model.ts:60

A file field’s settings, as /meta gives them; see Files.

accept: string[]

Defined in: packages/schema/src/model.ts:62

The content types an upload may have, exact or type/*; any when empty.


optional derive?: string[]

Defined in: packages/schema/src/model.ts:68

The fields each upload writes: those of .derive() and the placeholder’s.


optional external?: true

Defined in: packages/schema/src/model.ts:76

Whether a value may also be an https URL of a file elsewhere, drawn and linked as it is (.externalUrls()).


maxSize: number

Defined in: packages/schema/src/model.ts:64

The largest upload, in bytes.


optional original?: ImageVariant

Defined in: packages/schema/src/model.ts:74

What is stored instead of an uploaded image, when the upload is not kept.


optional placeholder?: string

Defined in: packages/schema/src/model.ts:70

The text field holding each image’s ThumbHash, base64 (.placeholder()).


provider: string

Defined in: packages/schema/src/model.ts:66

The name of the storage provider the files go to.


optional variants?: Record<string, ImageVariant>

Defined in: packages/schema/src/model.ts:72

The resized copies stored beside each image, by name (.variants()).