Skip to content

FileOptions

FileOptions = object

Defined in: packages/schema/src/files/file-options.ts:57

A file field’s settings, as the builder collects them.

accept: string[]

Defined in: packages/schema/src/files/file-options.ts:59

The allowed types and type/* wildcards (.accept()); any type when empty.


optional capture?: "environment" | "user"

Defined in: packages/schema/src/files/file-options.ts:79

The camera a phone or tablet opens instead of its file picker, rear or front, as HTML’s capture names them (.capture()).


optional derive?: Record<string, FileProcessor>

Defined in: packages/schema/src/files/file-options.ts:65

The processors computing other fields from each upload, by field name (.derive()).


optional external?: true

Defined in: packages/schema/src/files/file-options.ts:77

Whether a value may also be an https URL of a file elsewhere (.externalUrls()).


maxSize: number

Defined in: packages/schema/src/files/file-options.ts:61

The largest upload in bytes (.maxSize()).


optional original?: ImageVariant

Defined in: packages/schema/src/files/file-options.ts:75

The image stored instead of the upload (.variants()’ original).


optional placeholder?: string

Defined in: packages/schema/src/files/file-options.ts:67

The read-only text field each image’s ThumbHash goes to (.placeholder()).


provider: string

Defined in: packages/schema/src/files/file-options.ts:63

The provider of files.providers the files are stored with (.storage(), .public()).


optional sizeField?: string

Defined in: packages/schema/src/files/file-options.ts:71

The read-only integer field each file’s size in bytes goes to (.sizeField()).


optional typeField?: string

Defined in: packages/schema/src/files/file-options.ts:69

The read-only text field each file’s media type goes to (.typeField()).


optional variants?: Record<string, ImageVariant>

Defined in: packages/schema/src/files/file-options.ts:73

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