AEM6.3 coral touch ui saves image content path by default when not entered

srinivas_chann1

11-10-2019

Hi ,

I am using the below image component in coral touch ui.

When i just add dialog and save the dialog without adding any image placeholder and reopen the dialog it shows the component content path .

Please let me know how to fix this issue

1843125_pastedImage_0.png

<column

                                jcr:primaryType="nt:unstructured"

                                sling:resourceType="granite/ui/components/coral/foundation/container">

                                <items jcr:primaryType="nt:unstructured">

                                    <logoImage

                                        jcr:primaryType="nt:unstructured"

                                        sling:resourceType="cq/gui/components/authoring/dialog/fileupload"

                                        autoStart="{Boolean}false"

                                        class="cq-droptarget"

                                        fieldLabel="Logo Image"

                                        fileNameParameter="./logoImage/fileName"

                                        fileReferenceParameter="./logoImage/fileReference"

                                        mimeTypes="[image]"

                                        multiple="{Boolean}false"

                                        name="./logoImage/"

                                        title="Upload Image Asset"

                                        uploadUrl="/tmp/upload/*"

                                        useHTML5="{Boolean}true"/>

       </items>

      </column>

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Arun_Patidar

MVP

11-10-2019

jcr:primaryType="nt:unstructured"
   sling:resourceType="cq/gui/components/authoring/dialog/fileupload"
   autoStart="{Boolean}false"
   class="cq-droptarget"
   fileNameParameter="./fileName"
   fileReferenceParameter="./fileReference"
   mimeTypes="[image/gif,image/jpeg,image/png,image/tiff,image/svg+xml]"
   multiple="{Boolean}false"
   name="./file"
   title="Upload Image Asset"
   uploadUrl="${suffix.path}"
   useHTML5="{Boolean}true"/>

Try with the above.

Works with Image core component. You can take a reference from there.

Answers (1)

Answers (1)

jbrar

Employee

11-10-2019

I believe the File reference should be under the droptarget config nodes:

<cq:dropTargets jcr:primaryType="nt:unstructured">

    <file

        jcr:primaryType="cq:DropTargetConfig"

        accept="[.*]"

        groups="[media]"

        propertyName="./fileReference"/>

</cq:dropTargets>

Check [1] for more details.

[1] AEM Developer Learning : cq:dropTagets in cq:editConfig Node in AEM