3

I am making a plugin with Extbase. My Responsitory got image upload and i want front end user can upload image. When i check the FormFields.html from Partials, the field image upload was empty with simple text: "File upload is not implemented!". I tried to use

<f:form.upload property="logo" name="file" /><br /> 

but after submit the form, i got the error message: "Exception while property mapping at property path "logo": Property "name" was not found in target object of type "TYPO3\CMS\Extbase\Domain\Model\FileReference". No file was uploaded and no data was inserted to database.

Is there anyway to upload image and map it with extbase Respository?

Lee
  • 1,041
  • 7
  • 20
  • 31

1 Answers1

3

You can not use both property and name attributes in within upload Viewhelper. Have a look at https://github.com/helhum/upload_example for a working example.

jokumer
  • 2,249
  • 11
  • 22
  • I tried but it seem like we cannot upload image in front end. Is there anyway to upload image in front end and map it with ext model? – Lee Mar 17 '17 at 09:06
  • As i know, an upload feature is not that easy. But I dont really know, how your model looks like at the moment. Did you extend FrontendUser model? – jokumer Mar 17 '17 at 10:34