[英]Problem with file upload TCA after upgrading to TYPO3 10
On typo3v9 i had working file upload field with this TCA configuration:在typo3v9上,我有这个TCA配置的工作文件上传字段:
'image' => [
'exclude' => 0,
'label' => 'image upload',
'config' => [
'type' => 'group',
'internal_type' => 'db',
'uploadfolder' => 'uploads/folder',
'show_thumbs' => 1,
'size' => 5,
'allowed' => $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'],
'disallowed' => '',
],
],
but after migration to typo3v10 it does not work properly and give this result:但是在迁移到typo3v10后它不能正常工作并给出以下结果:
Someone have working solution for single file upload field?有人有单个文件上传字段的工作解决方案吗?
I guess you mean internal_type=file?我猜你的意思是 internal_type=file? That's deprecated.
那已被弃用。 Here an example for image upload.
这是图像上传的示例。 However you can allow other types here too, I am sure you can find more info on that.
但是,您也可以在此处允许其他类型,我相信您可以找到更多信息。
'photos' => [
'exclude' => true,
'label' => 'LLL:EXT:xxx/Resources/Private/Language/locallang_db.xlf:tx_xxx_domain_model_activity.photos',
'config' =>
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig(
'photos',
[
'appearance' => [
'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference'
],
'foreign_types' => [
'0' => [
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
],
\TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
]
],
'maxitems' => 30
],
$GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext']
),
],
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.