File Upload inclusion in Custom AEM Component for Remote Asset Selector
Hi Team,
We are migrating all our assets to a separate AEM Cloud instance from a 3rd party DAM.
Our sites instance is setup in another program while the assets is on a different program,
We want to use our current components such that they are able to pull and render the assets remotely.
Following https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/assets/dynamicmedia/dynamic-media-open-apis/integrate-remote-approved-assets-with-sites# we are able to leverage image v3 component to fetch assets remotely.
However in our custom component we were not able to do so. The previous DAM image URLs were represented in these custom components as simple textfields.
We modified and added the below properties -
Changing sling:resourceType from textfield to fileupload
sling:resourceType="cq/gui/components/authoring/dialog/fileupload"
enableNextGenDynamicMedia="{Boolean}true"fileReferenceParameter="./fileReference"fileNameParameter="./fileName"On adding these values we are able to get the file upload option with both Remote and Local Asset Selector.
When we select the image from remote repo the asset path is stored in JCR as “/urn:aaid:aem:0000bh81-2fc9-462a-9229-1234567890/e6252f18-ctc-iStock_000003487850Small.jpg”
The HTL for the component then renders the img with src=”/urn:aaid:aem...”
However, we want to expose the URL on the page as delivery URL or custom domain URL so that the image can actually load.
What will be the best way to do so?
Thanks,
Nagesh