Attention
TYPO3 v11 has reached end-of-life as of October 31th 2024 and is no longer being maintained. Use the version switcher on the top left of this page to select documentation for a supported version of TYPO3.
Need more time before upgrading? You can purchase Extended Long Term Support (ELTS) for TYPO3 v11 here: TYPO3 ELTS.
Custom file processors
For custom needs in terms of file processing, registration of custom file processors is available.
Create a new processor class
The file must implement the \TYPO3\
and two required methods.
can
Process Task () - Will decide whether the given file should be handled at all. The expected return type is boolean.
process
Task () - Will then do whatever needs to be done to process the given file.
Register the file processor
To register a new processor, add the following code to ext_
$GLOBALS['TYPO3_CONF_VARS']['SYS']['fal']['processors']['MyNewImageProcessor'] = [
'className' => \MyVendor\ExtensionName\Resource\Processing\MyNewImageProcessor::class,
'before' => ['LocalImageProcessor'],
];
With the before
and after
options, priority can be defined.
Note
Only one file processor will handle any given file. Once the first match for can
has been found, this is the
processor that will handle the file. There is no cascading or sequence possible, so make sure your processor does all the work
necessary.