[TYPO3-dev] extbase: file upload in plugin no longer working since 6.1.0.

Philipp Gampe philipp.gampe at typo3.org
Fri May 17 21:34:19 CEST 2013


Hi Charles Brunet,

Charles Brunet wrote:

> Just for the records, I got the solution to this problem on StackOverflow:
> http://stackoverflow.com/questions/16405963/typo3-how-to-use-file-upload-with-extbase

Please also record such solutions on the list:

> /**
>  * initialize actions
>  */
> public function initializeAction() {
>     if ($this->arguments->hasArgument('myModel')) {
>         $this->arguments->getArgument('myModel')-
>getPropertyMappingConfiguration()->setTargetTypeForSubProperty('upload', 
'array');
>     }
> }


> 2013/5/3 Charles Brunet <charles.fmj at gmail.com>
> 
>>  I'm building a simple extension based on extbase / fluid which has an
>> upload form in a frontend plugin. It was working in 6.0.4, but now I get
>> the following exception when I try to upload a file:
>>
>> > #1297759968: Exception while property mapping at property path
>> "fichier":No converter found which can be used to convert from "array" to
>> "string".
>>
>> The problem seems to be related to the fact that the web request receives
>> an array for the uploaded file, but the model stores it as a string. How
>> can I get rid of this exception? How should I handle file upload in
>> extbase?

Best regards
-- 
Philipp Gampe – PGP-Key 0AD96065 – TYPO3 UG Bonn/Köln
Documentation – Active contributor TYPO3 CMS
TYPO3 .... inspiring people to share!




More information about the TYPO3-dev mailing list