您可以为每个字段单独设置,请参阅 Kevin Appelt 的帖子。在这种情况下,您需要记住将来添加此设置的任何其他字段。
要在全局范围内调整所有字段的文件上传,您可以使用 UserTSConfig edit_docModuleUpload。见https://docs.typo3.org/typo3cms/TSconfigReference/singlehtml/Index.html#document-UserTsconfig/Setup/Index
为避免所有字段的文件上传,只需添加到您的客户扩展(站点包)的 ext_localconf.php:
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addUserTSConfig('setup.override.edit_docModuleUpload = 0');
如果您想为 UserTSConfig 使用单独的配置文件,我建议将其添加到 ext_localconf.php
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addUserTSConfig('<INCLUDE_TYPOSCRIPT: source="FILE:EXT:sitepackage/Configuration/TypoScript/User/Default.ts">');
在你的扩展/Configuration/TypoScript/User/Default.ts
setup.override.edit_docModuleUpload = 0
如果您还想在文件元素浏览器(弹出窗口)中排除文件上传和文件夹创建,请将以下代码添加到您的扩展 /Configuration/TypoScript/User/Default.ts
# Hide 'file upload' and 'create folder' in link- and element browser
options.folderTree.uploadFieldsInLinkBrowser = 0
options.folderTree.hideCreateFolder = 1
options.createFoldersInEB = 1