FileUpload needs img to upload again and again

Avatar

Avatar
Validate 10
Level 1
pillaivinit
Level 1

Likes

0 likes

Total Posts

30 posts

Correct reply

1 solution
Top badges earned
Validate 10
Validate 1
Applaud 5
Affirm 1
View profile

Avatar
Validate 10
Level 1
pillaivinit
Level 1

Likes

0 likes

Total Posts

30 posts

Correct reply

1 solution
Top badges earned
Validate 10
Validate 1
Applaud 5
Affirm 1
View profile
pillaivinit
Level 1

04-12-2020

upload.jpg

 I have drag n dropped a logo from DAM and clicked save. Now when I open the dialog again, I can see that the previous link of logo is there but the dialog still needs me to add image.

 

can anybody tell me why is this happening? why the image is not retained

I'm using AEM 6.3 and following is the dialog code

 

<file
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/form/fileupload"
autoStart="{Boolean}true"
cq-msm-lockable="/file"
fieldLabel="Upload files"
mimeTypes="[image/*]"
multiple="{Boolean}false"
name="./file"
sizeLimit="100000000"
text="Upload file"
uploadUrl="/content/dam"
required="{Boolean}true"
allowUpload="{Boolean}false"
uploadUrlBuilder=""/>

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Give Back 3
MVP
Manjunath_K
MVP

Likes

140 likes

Total Posts

188 posts

Correct reply

61 solutions
Top badges earned
Give Back 3
Give Back
Boost 50
Boost 5
Boost 3
View profile

Avatar
Give Back 3
MVP
Manjunath_K
MVP

Likes

140 likes

Total Posts

188 posts

Correct reply

61 solutions
Top badges earned
Give Back 3
Give Back
Boost 50
Boost 5
Boost 3
View profile
Manjunath_K
MVP

04-12-2020

@pillaivinit 

Please change mimeTypes property value as highlighted below, then it will work as expected.

 

<file
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/form/fileupload"
autoStart="{Boolean}true"
cq-msm-lockable="/file"
fieldLabel="Upload files"
mimeTypes="[image]"
multiple="{Boolean}false"
name="./file"
sizeLimit="100000000"
text="Upload file"
uploadUrl="/content/dam"
required="{Boolean}true"
allowUpload="{Boolean}false"
uploadUrlBuilder=""/>

 

Answers (5)

Answers (5)

Avatar

Avatar
Establish
MVP
Anudeep_Garnepudi
MVP

Likes

275 likes

Total Posts

320 posts

Correct reply

87 solutions
Top badges earned
Establish
Ignite 1
Give Back 5
Give Back 3
Give Back 10
View profile

Avatar
Establish
MVP
Anudeep_Garnepudi
MVP

Likes

275 likes

Total Posts

320 posts

Correct reply

87 solutions
Top badges earned
Establish
Ignite 1
Give Back 5
Give Back 3
Give Back 10
View profile
Anudeep_Garnepudi
MVP

04-12-2020

Hi @pillaivinit 

Change the mimeTypes property value to image( remove /*), that should resolve your issue.

-AG

Avatar

Avatar
Give Back 3
MVP
Manjunath_K
MVP

Likes

140 likes

Total Posts

188 posts

Correct reply

61 solutions
Top badges earned
Give Back 3
Give Back
Boost 50
Boost 5
Boost 3
View profile

Avatar
Give Back 3
MVP
Manjunath_K
MVP

Likes

140 likes

Total Posts

188 posts

Correct reply

61 solutions
Top badges earned
Give Back 3
Give Back
Boost 50
Boost 5
Boost 3
View profile
Manjunath_K
MVP

04-12-2020

@pillaivinit 

Please change mimeTypes value as mentioned below.

 

mimeTypes="[image]"

 

Avatar

Avatar
Validate 1
Level 4
Sandeep6
Level 4

Likes

56 likes

Total Posts

66 posts

Correct reply

15 solutions
Top badges earned
Validate 1
Give Back
Boost 50
Boost 5
Boost 3
View profile

Avatar
Validate 1
Level 4
Sandeep6
Level 4

Likes

56 likes

Total Posts

66 posts

Correct reply

15 solutions
Top badges earned
Validate 1
Give Back
Boost 50
Boost 5
Boost 3
View profile
Sandeep6
Level 4

04-12-2020

Hi @pillaivinit ,

please update the dialog as below.

 

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

 

Avatar

Avatar
Give Back
Employee
Mariia_Lukianet
Employee

Likes

15 likes

Total Posts

11 posts

Correct reply

2 solutions
Top badges earned
Give Back
Boost 5
Boost 3
Boost 10
Boost 1
View profile

Avatar
Give Back
Employee
Mariia_Lukianet
Employee

Likes

15 likes

Total Posts

11 posts

Correct reply

2 solutions
Top badges earned
Give Back
Boost 5
Boost 3
Boost 10
Boost 1
View profile
Mariia_Lukianet
Employee

04-12-2020

granite/ui/components/foundation/form/fileupload

This is legacy Coral2 FileUpload [1], better not to use it.
Try Coral3 FilleUpload [2], does the issue persists?

granite/ui/components/coral/foundation/form/fileupload


[1] https://helpx.adobe.com/experience-manager/6-3/sites/developing/using/reference-materials/granite-ui... 
[2] https://helpx.adobe.com/experience-manager/6-3/sites/developing/using/reference-materials/granite-ui... 

Avatar

Avatar
Give Back
Employee
Mariia_Lukianet
Employee

Likes

15 likes

Total Posts

11 posts

Correct reply

2 solutions
Top badges earned
Give Back
Boost 5
Boost 3
Boost 10
Boost 1
View profile

Avatar
Give Back
Employee
Mariia_Lukianet
Employee

Likes

15 likes

Total Posts

11 posts

Correct reply

2 solutions
Top badges earned
Give Back
Boost 5
Boost 3
Boost 10
Boost 1
View profile
Mariia_Lukianet
Employee

04-12-2020

Can you paste here how the File Upload is defined in the dialog?
And what AEM version you use.