Image not saved on image node | Community
Skip to main content
alexandrad27705
Level 2
May 20, 2016 6:06 AM UTC

Image not saved on image node

Hi, 

I am using AEM 6.1 and I want to save an image in the page properties of a page. I've created an additional tab and my dialog snippet looks like this:

<image
      jcr:primaryType="nt:unstructured"
      sling:resourceType="granite/ui/components/foundation/form/fileupload"
      autoStart="{Boolean}false"
      class="cq-droptarget"
      fieldLabel="Hero Image"
      fileNameParameter="./image/fileName"
      mimeTypes="[image]"
      multiple="{Boolean}false"
      name="./image/file"
      uploadUrl="${suffix.path}"
      useHTML5="{Boolean}true"/>

I can drag&drop an image from the asset rail and an 'image' node is created underneath the page's 'jcr:content' node but there is no 'fileReference' attribute saved to the 'image' node. 

Is there anything missing? Or am I doing something wrong?

I have the same problem with and without installing Service Pack 1 for 6.1 

Any help is greatly appreciated. Thanks, 

Alex

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

7 replies

cquser1
Level 7
Dec 18, 2017 12:23 PM UTC

Hi,

In case drag and drop is not required and main motive is to have an image, pathbrowser is a nice option

<sample

                                               

                                                jcr:primaryType="nt:unstructured"

                                                sling:resourceType="granite/ui/components/foundation/form/pathbrowser"

                                                fieldLabel="Name"

                                                name="./Name"

                                                rootPath="/content/dam"/>

Translate
manish_anand
Level 3
Dec 18, 2017 1:07 PM UTC

But if i am setting my rootPath as /content/dam.

will it show asset icons aling with there names in pathbrowser window?

Translate
Techaspect_Solu
Level 7
Dec 18, 2017 10:47 AM UTC

Hi Alex,

From your dialog snippet, we could see that you didn't add  fileReferenceParameter="./fileReference". Try adding fileReferenceParameter in properties as shown in the below screenshot.

You should be able to see it in your jcr:content node now.

We hope this helps!

Regards,

TechAspect Solutions

Translate
manish_anand
Level 3
Jan 3, 2018 9:14 AM UTC

I tried adding the property fileReferenceParameter={String}./fileReference.

But i dont see fileReference property in Image node.

I did changes in _cq_dialog of page properties.

Am i missing something?

Translate
anales75361900
New Participant
Jan 30, 2018 2:41 AM UTC

I am seeing the same issues under page properties

Translate
edubey
Level 10
Dec 15, 2017 6:36 PM UTC

is this happening only with page properties?

Did you tried using same field as part of a component?

Translate
manish_anand
Level 3
Dec 14, 2017 3:02 PM UTC

Hi,

I am facing the same issue in 6.3

Did you fix it?

Regards,

Manish

Translate