我正在使用此Helhum示例从前端上传图像,该前端位于以下链接中
https://github.com/helhum/upload_example
如果我们在位置上的部分文件中检查其表单字段https://github.com/helhum/upload_example/blob/master/Resources/Private/Partials/Example/FormFields.html
下面有两个上传选项
{namespace h=Helhum\UploadExample\ViewHelpers}
<label for="title">
<f:translate key="tx_uploadexample_domain_model_example.title" /> <span class="required">(required)</span>
</label>
<f:form.textfield property="title" />
<label for="image">
<f:translate key="tx_uploadexample_domain_model_example.image" />
</label>
<h:form.upload property="image" >
<f:if condition="{resource}">
<f:image image="{resource}" alt="" width="50"/>
</f:if>
</h:form.upload>
<label for="image_collection">
<f:translate key="tx_uploadexample_domain_model_example.image_collection" />
</label>
这里为 property="imageCollection.0"
如果我把它 multiple="multiple"
然后它给我以下错误
1297759968:在属性路径“imageCollection”的属性映射时出现异常:PHP警告:spl_object_hash()期望参数1为object,在/var/www/webroot/typo3_src-7.6.14/typo3/sysext/extbase/Classes中给出null /Persistence/ObjectStorage.php第155行(更多信息)
如果我删除0并尝试单击一个按钮,它甚至不会生成一个表单,并给我以下错误
1297759968:属性路径“”处的属性映射异常:源不是string,array,float,integer或boolean类型,但类型为“object”(更多信息)
简而言之,如何修复此示例以进行多个图像上传 . 我尝试使用没有辅助功能只是使用了标准流体功能 <f:form:upload>
它仍然给我一个相同的错误 . 请有人帮我解决这个问题 .