ColumnType implements [Field.ColumnType] interface method.
FindGetter implements the [GetterFinder] interface.
FindSetter implements the [SetterFinder] interface.
ValidateSettings implements [Field.ValidateSettings] interface method.
Hidden hides the field from the API response.
Id is the unique stable field identifier.
It is automatically generated from the name when adding to a collection FieldsList.
MaxSelect specifies the max allowed files.
For multiple files the value must be > 1, otherwise fallbacks to single (default).
MaxSize specifies the maximum size of a single uploaded file (in bytes).
If zero, a default limit of 5MB is applied.
MimeTypes specifies an optional list of the allowed file mime types.
Leave it empty to disable the validator.
Name (required) is the unique name of the field.
Presentable hints the Dashboard UI to use the underlying field record value in the relation preview label.
Protected will require the users to provide a special file token to access the file.
Note that by default all files are publicly accessible.
For the majority of the cases this is fine because by default all file names have random part appended to their name which need to be known by the user before accessing the file.
Required will require the field value to have at least one file.
System prevents the renaming and removal of the field.
Thumbs specifies an optional list of the supported thumbs for image based files.
Each entry must be in one of the following formats:
- WxH (eg. 100x300) - crop to WxH viewbox (from center)
- WxHt (eg. 100x300t) - crop to WxH viewbox (from top)
- WxHb (eg. 100x300b) - crop to WxH viewbox (from bottom)
- WxHf (eg. 100x300f) - fit inside a WxH viewbox (without cropping)
- 0xH (eg. 0x300) - resize to H height preserving the aspect ratio
- Wx0 (eg. 100x0) - resize to W width preserving the aspect ratio
Generated using TypeDoc
FileField defines "file" type field for managing record file(s).
Only the file name is stored as part of the record value. New files (aka. files to upload) are expected to be of *filesytem.File.
If MaxSelect is not set or <= 1, then the field value is expected to be a single record id.
If MaxSelect is > 1, then the field value is expected to be a slice of record ids.
The respective zero record field value is either empty string (single) or empty string slice (multiple).
The following additional setter keys are available: