Coral Fileupload not saving fileNameParameter value

Avatar

Avatar
Level 1
AmirYamin
Level 1

Likes

0 likes

Total Posts

6 posts

Correct reply

0 solutions
View profile

Avatar
Level 1
AmirYamin
Level 1

Likes

0 likes

Total Posts

6 posts

Correct reply

0 solutions
View profile
AmirYamin
Level 1

07-11-2019

I am working on a component that requires an image to be uploaded using file upload widget inside a coral multi-field. File Upload is working pretty good but it's not saving the fileNameParameter field. The file name is necessary in my case. Anyone can help me where I'm wrong

Following is the dialog configuration:

<icon

    jcr:primaryType="nt:unstructured"

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

    autoStart="{Boolean}false"

    allowUpload="{Boolean}false"

    class="cq-droptarget"

    fileNameParameter="./iconName"

    fileReferenceParameter="./iconReference"

    mimeTypes="[image/png,image/svg+xml]"

    multiple="{Boolean}false"

    name="./icon"

    title="Choose Sign In Icon Asset"

    useHTML5="{Boolean}true"/>

Replies

Avatar

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,462 likes

Total Posts

3,328 posts

Correct reply

949 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,462 likes

Total Posts

3,328 posts

Correct reply

949 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile
Arun_Patidar
MVP

07-11-2019

Try to add one more property

uploadUrl

String

${suffix.path}

Avatar

Avatar
Level 1
AmirYamin
Level 1

Likes

0 likes

Total Posts

6 posts

Correct reply

0 solutions
View profile

Avatar
Level 1
AmirYamin
Level 1

Likes

0 likes

Total Posts

6 posts

Correct reply

0 solutions
View profile
AmirYamin
Level 1

07-11-2019

I have asked to save file name not upload url, I'm already getting file src through fileReferenceParameter

Avatar

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,462 likes

Total Posts

3,328 posts

Correct reply

949 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,462 likes

Total Posts

3,328 posts

Correct reply

949 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile
Arun_Patidar
MVP

08-11-2019

Hi,

when you upload the file, filename is saved in the name property.

When you reference file from DAM then file path is stored in fileReferenceParameter property

fileNameParameter is used to shows file in fileupload dialog.

fileNameParameter value never stored.

Avatar

Avatar
Level 1
AmirYamin
Level 1

Likes

0 likes

Total Posts

6 posts

Correct reply

0 solutions
View profile

Avatar
Level 1
AmirYamin
Level 1

Likes

0 likes

Total Posts

6 posts

Correct reply

0 solutions
View profile
AmirYamin
Level 1

10-11-2019

Hi Arun

I have named file upload field  "icon", I have tried ${properties.icon.name} and ${properties.iconName}, but it does not return the file name