Project

General

Profile

Actions

Feature #65797

open

TCA: Allow context-based filtering by File Storage in FAL IRRE relations

Added by Gabe Blair over 9 years ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
File Abstraction Layer (FAL)
Target version:
-
Start date:
2015-03-18
Due date:
% Done:

0%

Estimated time:
PHP Version:
5.5
Tags:
Complexity:
medium
Sprint Focus:

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
$allowedFileExtensions
and
$disallowedFileExtensions

Would it be possible to add something like these?:

$allowedFileStorages
and
$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.


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #73355: Respect allowed file extensions during file searches in file browserClosed2016-02-12

Actions
Actions #1

Updated by Tymoteusz Motylewski over 7 years ago

  • Related to Bug #73355: Respect allowed file extensions during file searches in file browser added
Actions

Also available in: Atom PDF