大型文件的渲染类型输入链接,无需复制文件
rendertype inputlink for huge files without copying the file
我需要一个带有 link 的 tca 字段到大文件 (100-900 MB)。我使用了这个 TCA:
'config' => [
'type' => 'input',
'renderType' => 'inputLink',
'fieldControl' => [
'linkPopup' => [
'options' => [
'blindLinkOptions' => 'mail,page,spec,url,folder',
'blindLinkFields' => 'class,params,target,title',
],
],
],
]
它可以工作,但是当我保存数据时,TYPO3 似乎复制了文件,并且我收到错误消息,指出超过了 50 MB 的限制。但我只需要一个简单的 link 到文件。
在版本 7 中,它使用以下代码:
'config' => array (
'type' => 'input',
'size' => '100',
'max' => '255',
'eval' => 'trim',
'wizards' => array(
'_PADDING' => 2,
'link' => array(
'type' => 'popup',
'title' => 'LLL:EXT:cms/locallang_ttc.xml:header_link_formlabel',
'icon' => 'link_popup.gif',
'module' => array(
'name' => 'wizard_element_browser',
'urlParameters' => array(
'mode' => 'wizard',
'act' => 'file'
)
),
'JSopenParams' => 'height=300,width=500,status=0,menubar=0,scrollbars=1'
)
),
)
但它在 TYPO3 8 中不再起作用。
我该如何解决这个问题?
更正:
对不起,我错了。整个问题是错误的:上面的配置按预期工作,它 不 复制文件,它只 links 到文件。我犯了另一个错误,导致对我的真正问题的误解。
抱歉噪音...
为了结束话题,我会将答案标记为正确。在某种程度上,这是因为它给了我一个很好的提示。
看看FAL。此处文件仅参考原文件
'image' => array(
'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.images',
'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig('image', array(
'appearance' => array(
'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference'
),
// custom configuration for displaying fields in the overlay/reference table
// to use the imageoverlayPalette instead of the basicoverlayPalette
'foreign_types' => array(
...
)
), $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'])
),
我需要一个带有 link 的 tca 字段到大文件 (100-900 MB)。我使用了这个 TCA:
'config' => [
'type' => 'input',
'renderType' => 'inputLink',
'fieldControl' => [
'linkPopup' => [
'options' => [
'blindLinkOptions' => 'mail,page,spec,url,folder',
'blindLinkFields' => 'class,params,target,title',
],
],
],
]
它可以工作,但是当我保存数据时,TYPO3 似乎复制了文件,并且我收到错误消息,指出超过了 50 MB 的限制。但我只需要一个简单的 link 到文件。
在版本 7 中,它使用以下代码:
'config' => array (
'type' => 'input',
'size' => '100',
'max' => '255',
'eval' => 'trim',
'wizards' => array(
'_PADDING' => 2,
'link' => array(
'type' => 'popup',
'title' => 'LLL:EXT:cms/locallang_ttc.xml:header_link_formlabel',
'icon' => 'link_popup.gif',
'module' => array(
'name' => 'wizard_element_browser',
'urlParameters' => array(
'mode' => 'wizard',
'act' => 'file'
)
),
'JSopenParams' => 'height=300,width=500,status=0,menubar=0,scrollbars=1'
)
),
)
但它在 TYPO3 8 中不再起作用。
我该如何解决这个问题?
更正:
对不起,我错了。整个问题是错误的:上面的配置按预期工作,它 不 复制文件,它只 links 到文件。我犯了另一个错误,导致对我的真正问题的误解。
抱歉噪音...
为了结束话题,我会将答案标记为正确。在某种程度上,这是因为它给了我一个很好的提示。
看看FAL。此处文件仅参考原文件
'image' => array(
'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.images',
'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig('image', array(
'appearance' => array(
'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference'
),
// custom configuration for displaying fields in the overlay/reference table
// to use the imageoverlayPalette instead of the basicoverlayPalette
'foreign_types' => array(
...
)
), $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'])
),