Fileupload coral3 resource-type not working. | Community
Skip to main content
Level 2
April 22, 2021

Fileupload coral3 resource-type not working.

  • April 22, 2021
  • 3 replies
  • 3082 views

I am trying to migrate a component from Coral 2 to Coral 3. We have a sling:resourceType= granite/ui/components/foundation/form/fileupload which we changed to granite/ui/components/coral/foundation/form/fileupload. But after doing so the component dialog doesn't open.

 

I looked at the OOTB AEM core image component at this location (/apps/core/wcm/components/image/v1/image) and got surprised that its using “cq/gui/components/authoring/dialog/fileupload”, instead of coral-3 resource type (/libs/granite/ui/components/coral/foundation/form/fileupload). All other nodes in this component are using coral-3 resource-type, but not the fileupload. Is there any reason for that?

 

We went ahead with the cq/gui/components/authoring/dialog/fileupload, but this is breaking our Alt Text validation functionality. Can you please let me know why in Coral3 granite/ui/components/coral/foundation/form/fileupload is not being used?

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

3 replies

Asutosh_Jena_
Community Advisor
Community Advisor
April 22, 2021

HI @ks_hitijingole 

 

Which version of AEM you are finding this issue?

 

Update:

Please try with the below code. It works on AEM 6.5

 

<image
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/fileupload"
autoStart="{Boolean}false"
fieldLabel="Image"
class="cq-droptarget"
fieldDescription="Configure Image"
fileNameParameter="./fileName"
fileReferenceParameter="./fileReference"
mimeTypes="[image/gif,image/jpeg,image/png,image/tiff,image/svg+xml]"
multiple="{Boolean}false"
name="./file"
text="Upload"
title="Upload Image Asset"
useHTML5="{Boolean}true"/>

 

Ensure to remove "uploadUrl" if you are not using the "autoStart" as "true". The URL to upload the file. This is only required when autoStart is true.

https://helpx.adobe.com/experience-manager/6-4/sites/developing/using/reference-materials/granite-ui/api/jcr_root/libs/granite/ui/components/coral/foundation/form/fileupload/index.html

 

 

 

Thanks!

Level 2
April 22, 2021
Hi @asutosh_jena_ we are facing the issue with AEM 6.5.6.0.
arunpatidar
Community Advisor
Community Advisor
April 22, 2021

I would recommend to use cq/gui/components/authoring/dialog/fileupload orgranite/ui/components/foundation/form/fileupload instead of granite/ui/components/coral/foundation/form/fileupload, coral3 fileupload does not provide functionality to browse assets from AEM DAM. you can only upload from local.

Arun Patidar
Level 2
April 22, 2021
Hey @arunpatidar, is it okay to use a Coral UI 2 resourceType while other nodes in the component are in Coral UI 3?
Dipti_Chauhan
Community Advisor
Community Advisor
July 14, 2021

Hi @kautuk_sahni 

  As drag n drop does not work with coral3 fileupload</libs/granite/ui/components/coral/foundation/form/fileupload>. Can you confirm if is this bug or this is how it is supposed to work.

Thanks

Dipti Chauhan