In AEM 6.4, fileupload coral3 resource-type not working and neither backward-compatible
In AEM 6.4, fileupload coral 3 resource-type (/libs/granite/ui/components/coral/foundation/form/fileupload) does not have the property “fileReference” which used to store the location of file in DAM (https://helpx.adobe.com/experience-manager/6-3/sites/developing/using/reference-materials/granite-ui/api/jcr_root/libs/granite/ui/components/coral/foundation/form/fileupload/index.html). When I looked at coral2 resource type (/libs/granite/ui/components/foundation/form/fileupload), I could find that property. So, while migrating to 6.4 with coral3, image component stopped working, because backend code is looking for “fileReference" property which is not found now. How to resolve this issue?
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?
What is the recommended approach now -
- First of all, coral3 resource-type (/libs/granite/ui/components/coral/foundation/form/fileupload) is not working. If somehow, we could make it work, then also, we have to refactor the backend code completely and re-do the authoring as properties are changed as mentioned above. This is a huge effort because we have huge content in production which is using image component.
- Can we keep it to coral 2 resource-type? (/libs/granite/ui/components/foundation/form/fileupload)
- Should we keep it to “cq/gui/components/authoring/dialog/fileupload”, as implemented in OOTB image component?