File

The File type generates a field for file relations.

It corresponds with the TCA type => 'file'.

SQL overrides via alternativeSql allowed: no.

Settings

enableImageManipulation
Required:false
Type:boolean
Default:false

If enabled, an additional image palette will be rendered, which consists of the fields crop, title, alternative, link and description.

allowed
Required:

false

Type:

string|array

Default:

‘’

Possible values: common-image-types, common-media-types or your custom list of file types.

maxitems
Required:false
Type:integer
Default:99999

Maximum number of child items. Defaults to a high value. JavaScript record validation prevents the record from being saved if the limit is not satisfied.

minitems
Required:false
Type:integer
Default:0

Minimum number of child items. Defaults to 0. JavaScript record validation prevents the record from being saved if the limit is not satisfied. The field can be set as required by setting minitems to at least 1.

For more advanced configuration refer to the TCA documentation.

Example

Minimal

name: example/file
group: common
fields:
  - identifier: image
    type: File

Advanced / use case

name: example/file
group: common
fields:
  - identifier: image
    type: File
    enableImageManipulation: true
    maxitems: 10
    minitems: 1
    allowed: common-image-types