Feature #65797
openTCA: Allow context-based filtering by File Storage in FAL IRRE relations
0%
Description
Currently, when configuring the TCA for a FAL relation, you can specify which file types are allowed and available in the element browser when selecting the file. It would be awesome to be able to also scope a particular TCA context to a subset of all available FAL storages.
FYI: References below are from TYPO3 6.2.11 release
For example, in the helper method
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig
we currently have parameters for
$allowedFileExtensionsand
$disallowedFileExtensions
Would it be possible to add something like these?:
$allowedFileStoragesand
$disallowedFileStorages
I spent a little time on this, and it appears filtering on the DataHandler / saving side can be relatively straightforward, by adding a new filtering class in $config['filter'].
The trickier part is dealing with the element browser. The configuration interface available in $config['foreign_selector_fieldTcaOverride'] (typo3/sysext/core/Classes/Utility/ExtensionManagementUtility.php:508) appears designed to support filtering only by the single facet ('elementBrowserAllowed' => [list of file extensions]). The config interface problem can be worked around, perhaps, but I ran into really mucky territory when looking at ways to leverage the filtering information to limit tree scope when rendering the element browser in TYPO3\CMS\Recordlist\Browser\ElementBrowser::main_file (sysext/recordlist/Classes/Browser/ElementBrowser.php:1376).
Anyone have any ideas? This would be a great feature, and it seems unusual that it's not in place already.
Updated by Tymoteusz Motylewski over 7 years ago
- Related to Bug #73355: Respect allowed file extensions during file searches in file browser added