Image not saved on image node | Community
Skip to main content
alexandrad27705
Level 2
May 20, 2016

Image not saved on image node

  • May 20, 2016
  • 4 replies
  • 4382 views

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.

4 replies

manish_anand
Level 3
December 14, 2017

Hi,

I am facing the same issue in 6.3

Did you fix it?

Regards,

Manish

edubey
Level 10
December 15, 2017

is this happening only with page properties?

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

Techaspect_Solu
Level 7
December 18, 2017

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

manish_anand
Level 3
January 3, 2018

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?

anales75361900
January 30, 2018

I am seeing the same issues under page properties

cquser1
Level 7
December 18, 2017

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"/>

manish_anand
Level 3
December 18, 2017

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

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