问题
I want to define different upload folders in the TYPO3 form extension. Following the example in the manual (https://docs.typo3.org/c/typo3/cms-form/8.7/en-us/Concepts/FormFileStorages/Index.html) I tried the below configuration. In the form wizzard I can select the different folders. The two folders fileadmin/myfolder/folder1/ and fileadmin/myfolder/folder2/ exist, but in the frontend I get the error that the folder /myfolder/folder1/ does not exist. What am I doing wrong?
TYPO3:
CMS:
Form:
persistenceManager:
allowedFileMounts:
20: 1:/myfolder/folder1/
21: 2:/myfolder/folder2/
prototypes:
standard:
formElementsDefinition:
FileUpload:
formEditor:
predefinedDefaults:
properties:
saveToFileMount: '1:/myfolder/folder1/'
saveToFileMount: '2:/myfolder/folder2/'
editors:
400:
selectOptions:
10:
value: '1:/myfolder/folder1/'
label: '1:/myfolder/folder1/'
20:
value: '2:/myfolder/folder2/'
label: '2:/myfolder/folder2/'
properties:
saveToFileMount: '1:/myfolder/folder1/'
saveToFileMount: '2:/myfolder/folder2/'
Form:
renderingOptions:
templateRootPaths:
20: 'EXT:myext/Resources/Private/Templates/Extensions/form/Templates/'
partialRootPaths:
20: 'EXT:myext/Resources/Private/Templates/Extensions/form/Partials/'
回答1:
This configuration works:
TYPO3:
CMS:
Form:
persistenceManager:
allowedFileMounts:
10: 1:/myfolder/
prototypes:
standard:
formElementsDefinition:
FileUpload:
formEditor:
predefinedDefaults:
editors:
400:
selectOptions:
10:
value: '1:/myfolder/folder1/'
label: '1:/myfolder/folder1'
20:
value: '1:/myfolder/folder2/'
label: '1:/myfolder/folder2/'
properties:
saveToFileMount: '1:/myfolder/'
来源:https://stackoverflow.com/questions/64935200/typo3-8-form-define-several-file-upload-folders