Dialog Coral UI Issue - Changing field to "fileupload"
Hi Everyone,
We had a 3rd party DAM system which was tied to our dialog by a custom sling:resourceType “/apps/custom-connector/core/ui/components/content/custom-pathfield”
This is now being replaced with “cq/gui/components/authoring/dialog/fileupload” modeled on Image V3 component to allow Remote Asset Picker feature on the dialog.
Previously if we had a field say “heroImage” which hosted the old URL “https://media-www.abc.com/test.png”
This is now replaced by having a fileReference field “heroImagefileReference” which hosts the delivery API URL when an author selects the image from remote DAM instance such as “/urn:aaid:aem:000a885c-3807-4fbb-9a2f-9a6ae3120ccf/58fb9408-test.png”
The image renders well on both authoring dialog, editor.html view and even published page.
We also have written the sling model such that if no value is present in “fileReference” then we read the value in original “heroImage” to continue rendering the image.
This works fine on view mode but in the authoring dialog we get the below -
This is the HTML for it -
<img src="/content/projA/en/home-page/home-dam/jcr:content/root/responsivegrid/componentNameA.img.png?ch_ck=1773773358000" alt="/content/projA/en/home-page/home-dam/jcr:content/root/responsivegrid/componentNameA" title="/content/projA/en/home-page/home-dam/jcr:content/root/responsivegrid/componentNameA">
If I manually replace the src with value from original “heroImage” then the image appears correctly.
What will the best fix for this?
Thanks in advance!