FileFieldModel
FileFieldModel =
object
Defined in: packages/schema/src/model.ts:60
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:62
The content types an upload may have, exact or type/*; any when empty.
derive?
Section titled “derive?”
optionalderive?:string[]
Defined in: packages/schema/src/model.ts:68
The fields each upload writes: those of .derive() and the placeholder’s.
external?
Section titled “external?”
optionalexternal?: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
Section titled “maxSize”maxSize:
number
Defined in: packages/schema/src/model.ts:64
The largest upload, in bytes.
original?
Section titled “original?”
optionaloriginal?:ImageVariant
Defined in: packages/schema/src/model.ts:74
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:70
The text field holding each image’s ThumbHash, base64 (.placeholder()).
provider
Section titled “provider”provider:
string
Defined in: packages/schema/src/model.ts:66
The name of the storage provider the files go to.
variants?
Section titled “variants?”
optionalvariants?:Record<string,ImageVariant>
Defined in: packages/schema/src/model.ts:72
The resized copies stored beside each image, by name (.variants()).