Bug #70468
closedPropertyMapper cant't create object of type TYPO3\\CMS\\Core\\Resource\\Folder
0%
Description
In case of using frontend upload in an extbase, I use the storage for saving the uploaded files.
While trying to create the needed folder for using $storage->addFile() the properyMapper throws exeption
#1297759968: Exception while property mapping at property path "":Property "identifier" had no setter or constructor argument in target object of type "TYPO3\CMS\Core\Resource\Folder"
Following code does this error:
$folderType = array( 'storage' => $storage, 'identifier' => $mountpoint->getPath(), 'name' => $mountpoint->getTitle() ); /** @var \TYPO3\CMS\Core\Resource\Folder $folder */ $folder = $this->propertyMapper->convert($folderType,'TYPO3\\CMS\\Core\\Resource\\Folder');
Creating the object with "new" and assigning the parameters to the constructor does the thing correct and uploads the files to the specified folder.
My current Typo3 is 7.5
Updated by Mathias Brodala over 6 years ago
- Status changed from New to Needs Feedback
Can you please add more details how exactly the upload was implemented. See the following for a working example:
Updated by Markus Hofmann over 6 years ago
Could get closed, problem was, two years ago there was no documentation found by me, so I wrote it another way. Works for me, newer projects are built other way. Thanks for your request
Updated by Riccardo De Contardi over 6 years ago
- Status changed from Needs Feedback to Closed
@Markus Hofmann thank you for your feedback; I close this one for now. Feel free to reopen it if you think that this is the wrong decision or there is still something that should be done (or ping me and I'll do).