[TYPO3-german] Re: Extbase / FAL -> Verscheidene Dateitypen und mehrere Dateien gleichzeitig
M S
ms at ipandmore.de
Mon Nov 7 16:10:50 CET 2016
Update: Problem #1 (Property Mapping) habe ich nun wie folgt gelöst:
public function initializeCreateAction()
{
//Set TypeConverter option for image upload
$this->setTypeConverterConfigurationForImageUpload('newEntry');
$listOfSubProperties = array('myImages', 'myPictures','myVideos','myPdfs','myAudiofiles');
foreach($listOfSubProperties as $subProperty) {
$propMapConf = $this->arguments->getArgument('newEntry')->getPropertyMappingConfiguration();
$propMapConf->allowProperties($subProperty);
$propMapConf->setTargetTypeForSubProperty($subProperty, 'array');
}
}
In das Array listOfSubProperties trage ich nun alle Objekte ein welche durch f.form.upload mit dem Argument multiple verarbeitet werden sollen.
Problem #2 ist nicht gelöst. Im Gegenteil sogar:
Die "Konfiguration" scheint gar keine Auswirkung zu haben. Weder Upload-Ordner noch Dateiendung. Hier der aktuelle Zustand:
/**
* setTypeConverterConfigurationForImageUpload
*/
protected function setTypeConverterConfigurationForImageUpload($argumentName)
{
$uploadConfigurationForImages = [
UploadedFileReferenceConverter::CONFIGURATION_ALLOWED_FILE_EXTENSIONS => '$GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext']',
UploadedFileReferenceConverter::CONFIGURATION_UPLOAD_FOLDER => '1:/data/',
];
$uploadConfigurationForDocuments = [
UploadedFileReferenceConverter::CONFIGURATION_ALLOWED_FILE_EXTENSIONS => 'pdf',
UploadedFileReferenceConverter::CONFIGURATION_UPLOAD_FOLDER => '1:/data/',
];
/** @var PropertyMappingConfiguration $configurationForImages */
$configurationForImages = $this->arguments[$argumentName]->getPropertyMappingConfiguration();
$configurationForImages->forProperty('myImages')->setTypeConverterOptions(
'VENDOR\\EXTNAME\\Property\\TypeConverter\\UploadedFileReferenceConverter',
$uploadConfigurationForImages
);
/** @var PropertyMappingConfiguration $configurationForDocuments */
$configurationForDocuments = $this->arguments[$argumentName]->getPropertyMappingConfiguration();
$configurationForDocuments->forProperty('myPdfs')->setTypeConverterOptions(
'VENDOR\\EXTNAME\\Property\\TypeConverter\\UploadedFileReferenceConverter',
$uploadConfigurationForDocuments
);
}
Zwei Probleme:
2a) Warum greift die Konfiguration nicht?
2b) Wie kann ich darüber auch YouTube/VIMEO-Links verarbeiten?
--
Kind regards,
Michael
forum.typo3.org/index.php?t=tree&th=208338 direct_mail
forum.typo3.org/index.php?t=tree&th=210808 powermail
forum.typo3.org/index.php?t=tree&th=212804 Core
forum.typo3.org/index.php?t=tree&th=213115 clickenlarge
More information about the TYPO3-german
mailing list