---
title: "TCA definition"
manual: "TYPO3 Explained"
version: "13.4"
permalink: "https://docs.typo3.org/permalink/t3coreapi:fal-using-fal-tca@13.4"
source: "ApiOverview/Fal/UsingFal/Tca.rst"
rendered: "2026-09-18T05:52:58+00:00"
---

# TCA definition {#tca-definition}

This chapter explains how to create a field that makes it possible to
create relations to files.

<!-- TODO: no Markdown rendering for "versionchanged" -->

When using the TCA type file, TYPO3 takes care of
generating the according database field.
A developer does not need to define this field in an extension's
ext_tables.sql file.

The TCA field type [File](https://docs.typo3.org/m/typo3/reference-tca/13.4/en-us/ColumnsConfig/Type/File/Index.html#columns-file) can be used to provide a field
in which files can be referenced and/or uploaded:

**EXT:my_extension/Configuration/TCA/my_table.php**

```php
<?php

return [
  'ctrl' => [
    // ...
  ],
  'columns' => [
    'my_media_file' => [
      'label' => 'My image',
      'config' => [
        'type' => 'file',
        'allowed' => 'common-media-types',
      ],
    ],
    // ...
  ],
  // ...
];

```

The property [appearance](https://docs.typo3.org/m/typo3/reference-tca/13.4/en-us/ColumnsConfig/Type/File/Index.html#columns-file-properties-appearance) can be
used to specify, if a file upload button and file by URL button (Vimeo, Youtube)
should be displayed.

Example:

**EXT:my_extension/Configuration/TCA/Overrides/my_table.php**

```php
<?php

$GLOBALS['TCA']['my_table']['columns']['my_media_file']['config']['appearance'] = [
  'fileUploadAllowed' => false,
  'fileByUrlAllowed' => false,
];

```

This will suppress two buttons for upload and external URL and only leave
the button **Create new relation**.

## Migration from `ExtensionManagementUtility::getFileFieldTCAConfig` {#migration-from-php-extensionmanagementutility-getfilefieldtcaconfig}

**EXT:my_extension/Configuration/TCA/my_table.php (before and after)**

```php
// Before
'columns' => [
    'image' => [
        'label' => 'My image',
        'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig(
            'image',
            [
                'maxitems' => 6,
            ],
            $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext']
        ),
    ],
],

// After
'columns' => [
    'image' => [
        'label' => 'My image',
        'config' => [
            'type' => 'file',
            'maxitems' => 6,
            'allowed' => 'common-image-types'
        ],
    ],
],
```
