ResourceConsistencyService
FinalYes
This service is invoked by ResourceStorage when modifying files, validating the following: + only explicitly allowed file-extensions are allowed: see `TYPO3_CONF_VARS` settings for `textfile_ext`, `mediafile_ext` and `miscfile_ext` + only files having valid file-extension to mime-type items are allowed: e.g. denies using `image.exe` with `image/png`
Tags
Table of Contents
Methods
- __construct() : mixed
- addExceptionItem() : void
- removeException() : void
- validate() : void
Methods
__construct()
public
__construct(Random $random, Features $features, MimeTypeDetector $mimeTypeDetector) : mixed
Parameters
- $random : Random
- $features : Features
- $mimeTypeDetector : MimeTypeDetector
addExceptionItem()
public
addExceptionItem(ResourceStorage $storage, string|FileInterface $resource, string $targetFileName) : void
Parameters
- $storage : ResourceStorage
- $resource : string|FileInterface
- $targetFileName : string
removeException()
public
removeException(string $identifier) : void
Parameters
- $identifier : string
validate()
public
validate(ResourceStorage $storage, FileInterface|string $resource[, string $targetFileName = '' ]) : void
Parameters
- $storage : ResourceStorage
- $resource : FileInterface|string
-
holding the contents
- $targetFileName : string = ''
-
(optional) target file name to be used as the identifier