Extbase TYPO3 upload image for front end user

≡放荡痞女 提交于 2020-01-04 04:42:12

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/42849508/extbase-typo3-upload-image-for-front-end-user

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!