我是 AEM 的新手,我想在 cq 对话框中创建一个带有文件上传(pdf、jpeg)的页面模板。我只找到了缩略图的方法,但我找不到正确上传的方法。
缩略图想法/结构来自“创建集合”。
我的xml结构:
<form
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form"
class="foundation-form content-container"
foundationForm="{Boolean}true"
maximized="{Boolean}true"
method="post"
style="vertical">
<items jcr:primaryType="nt:unstructured">
<thumbnail
granite:class="share-resource-image grid"
jcr:primaryType="nt:unstructured"
sling:resourceType="dam/gui/coral/components/commons/thumbnail"
asset="${empty param.item ? requestPathInfo.suffix : param.item}"
defaultPreview="{Boolean}true">
<actions jcr:primaryType="nt:unstructured">
<upload
granite:id="thumbnail-upload-button"
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/fileupload"
autoStart="{Boolean}false"
mimeTypes="[image/png,image/jpeg,application/pdf]"
multiple="{Boolean}false"
name="coverImage"
renderReadOnly="{Boolean}true"
sizeLimit="100000000"
text="Dokument hochladen"
uploadUrl="will_be_replaced"
useHTML5="{Boolean}false"/>
</actions>
</thumbnail>
<removemanualthumbnail
granite:id="removemanualthumbnail"
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/hidden"
name="removemanualthumbnail"
value="false"/>
</items>
</form>