前端用户的Extbase TYPO3上传图像 [英] Extbase TYPO3 upload image for front end user

查看:41
本文介绍了前端用户的Extbase TYPO3上传图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在用Extbase制作一个插件.我的责任人上传了图片,我希望前端用户可以上传图片.当我从Partials中检查FormFields.html时,字段图像上载为空,带有简单文本:未实现文件上载!".我尝试使用

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

但是提交表单后,我收到错误消息:在属性路径徽标"处进行属性映射时发生异常:在类型"TYPO3 \ CMS \ Extbase \ Domain \ Model \"的目标对象中找不到属性"name" FileReference".没有文件上传,也没有数据插入数据库.

反正有上传图片并将其映射到extbase存储库吗?

解决方案

您不能在上传Viewhelper中同时使用属性 name 属性. 看看 https://github.com/helhum/upload_example 作为工作示例.

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?

解决方案

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.

这篇关于前端用户的Extbase TYPO3上传图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆