Not able to store the drag and drop values in JCR

Avatar

Avatar

Bhavani_B

Avatar

Bhavani_B

Bhavani_B

10-01-2021

Hi. I have an issue with the drag and drop fileupload properties. I can able to drag and drop the images from content finder but the values are not getting stored in the JCR. Can anyone help me to solve this. Thanks in advance.

 

<image
jcr:primaryType="nt:unstructured"
sling:resourceType="cq/gui/components/authoring/dialog/fileupload"
autoStart="{Boolean}false"
class="cq-droptarget"
fieldDescription="Select Banner Image Path"
fieldLabel="Select Banner Image Path"
fileNameParameter="./fileName"
fileReferenceParameter="./fileReference"
mimeTypes="[image/*]"
multiple="{Boolean}false"
name="./image"
required="{Boolean}true"
uploadUrl="${suffix.path}"
useHTML5="{Boolean}true"/>

 

 

 

 <cq:dropTargets jcr:primaryType="nt:unstructured">
<image
jcr:primaryType="cq:DropTargetConfig"
accept="[image/.*]"
groups="[media]"
propertyName="./fileReference">
<parameters
jcr:primaryType="nt:unstructured"
sling:resourceType="training/components/content/image"
imageCrop=""
imageMap=""
imageRotate=""/>
</image>
</cq:dropTargets> 

View Entire Topic

Avatar

Avatar

ChitraMadan

MVP

Avatar

ChitraMadan

MVP

ChitraMadan
MVP

12-01-2021

Hi @Bhavani_B ,

 

This is working fine for me. Can you please try using this:

<image
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/form/fileupload"
allowUpload="{Boolean}false"
autoStart="{Boolean}false"
class="cq-droptarget"
fieldLabel="Card Image"
fileNameParameter="./cardImgName"
fileReferenceParameter="./fileReference"
mimeTypes="[image]"
multiple="{Boolean}false"
name="./cardImgReference"
title="Upload Image"
uploadUrl="${suffix.path}"
useHTML5="{Boolean}true"/>