FileFieldModel
FileFieldModel =
object
Defined in: packages/schema/src/model.ts:90
A file field’s settings, as /meta gives them; see Files.
Properties
Section titled “Properties”accept
Section titled “accept”accept:
string[]
Defined in: packages/schema/src/model.ts:92
The content types an upload may have, exact or type/*; any when empty.
capture?
Section titled “capture?”
optionalcapture?:"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()).
derive?
Section titled “derive?”
optionalderive?: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.
external?
Section titled “external?”
optionalexternal?: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
Section titled “maxSize”maxSize:
number
Defined in: packages/schema/src/model.ts:94
The largest upload, in bytes.
original?
Section titled “original?”
optionaloriginal?:ImageVariant
Defined in: packages/schema/src/model.ts:108
What is stored instead of an uploaded image, when the upload is not kept.
placeholder?
Section titled “placeholder?”
optionalplaceholder?:string
Defined in: packages/schema/src/model.ts:100
The text field holding each image’s ThumbHash, base64 (.placeholder()).
provider
Section titled “provider”provider:
string
Defined in: packages/schema/src/model.ts:96
The name of the storage provider the files go to.
sizeField?
Section titled “sizeField?”
optionalsizeField?:string
Defined in: packages/schema/src/model.ts:104
The integer field holding each file’s size in bytes (.sizeField()).
typeField?
Section titled “typeField?”
optionaltypeField?: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()).
variants?
Section titled “variants?”
optionalvariants?:Record<string,ImageVariant>
Defined in: packages/schema/src/model.ts:106
The resized copies stored beside each image, by name (.variants()).