FileUpload needs img to upload again and again

Avatar

Avatar

pillaivinit

Avatar

pillaivinit

pillaivinit

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

Manjunath_K

MVP

Avatar

Manjunath_K

MVP

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

Anudeep_Garnepudi

MVP

Avatar

Anudeep_Garnepudi

MVP

Anudeep_Garnepudi
MVP

04-12-2020

Hi @pillaivinit 

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

-AG

Avatar

Avatar

Manjunath_K

MVP

Avatar

Manjunath_K

MVP

Manjunath_K
MVP

04-12-2020

@pillaivinit 

Please change mimeTypes value as mentioned below.

 

mimeTypes="[image]"

 

Avatar

Avatar

Sandeep6

Avatar

Sandeep6

Sandeep6

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

Mariia_Lukianet

Employee

Avatar

Mariia_Lukianet

Employee

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

Mariia_Lukianet

Employee

Avatar

Mariia_Lukianet

Employee

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.