Skip to content

FileFieldModel

FileFieldModel = object

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

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

accept: string[]

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

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


optional capture?: "environment" | "user"

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

The camera a phone or tablet opens instead of its file picker: environment (rear) or user (front) (.capture()).


optional derive?: string[]

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

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


optional external?: true

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

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:94

The largest upload, in bytes.


optional original?: ImageVariant

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

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


optional placeholder?: string

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

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


provider: string

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

The name of the storage provider the files go to.


optional sizeField?: string

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

The integer field holding each file’s size in bytes (.sizeField()).


optional typeField?: string

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

The text field holding each file’s media type, which serving and file viewers read (.typeField()).


optional variants?: Record<string, ImageVariant>

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

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