Project

General

Profile

Actions

Task #105908

open

Simplify TCA file extension preparation from placeholders

Added by Mathias Brodala 15 days ago. Updated 15 days ago.

Status:
Under Review
Priority:
Should have
Category:
FormEngine aka TCEforms
Target version:
Start date:
2025-01-10
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
13
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

The TCA file field supports the placeholders common-image-types, common-media-types and common-text-types as values for allowed and disallowed.

These are resolved from $GLOBALS['TYPO3_CONF_VARS'] within the TcaPreparation::prepareFileExtensions() method.

Currently this happens with with a RegEx match and inline mapping and a special case for common-image-types to use GFX instead of SYS.

This is hard to read and unnecessarily complex. Also it makes it harder to spot these magic strings and the particular $GLOBALS['TYPO3_CONF_VARS'] access in case of changes afterwards.

For these reasons, this should be simplified.


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Feature #98479: New TCA type "file"ClosedOliver Bartsch2022-09-30

Actions
Actions

Also available in: Atom PDF