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

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

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 variants?: Record<string, ImageVariant>

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

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