I'm using GraphQL to retrieve DAM content from AEM and I get the _publishUrl as
https://publish-p******.adobeaemcloud.com/content/dam/my-project/folder1/subfolder1/imageName.jpg
I don't want to expose the publish url of my AEM instance. Instead, I have Dynamic Media enabled and I want the url to come from there like :
https://dev.domain.com/adobe/dynamic/....
https://qa.domain.com/adobe/dynamic/....
for Dev, QA and other environments. Is there a way to achieve this?
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
According to the documentation you should use the "_dynamicUrl" field on the ImageRef, this is supposed to work only in AEMaaCS
Please let me know if that works
See more here:
@rakesh_h2 Thats a good RFE(Request For Enhancement). But in the meantime if you want to get the URLs by code you can build the DM URL for an image/video using "Scene7Service"
@Saravanan_Dharmaraj Thanks for the response. Any code snippets to share?
@rakesh_h2 below is the sample code of getting the image/video urls using Scene7Service from WCMUsePojo class.
public void setS7DynamicMediaModel() {
Scene7Service scene7Service = getSlingScriptHelper().getService(Scene7Service.class);
String productionImageServerUrl = StringUtils.stripToEmpty(scene7Service.getPublishServerUrl(this.getResource(), this.getResourceResolver()));
String imageServerUrl = scene7Service.getPreviewServerUrl(this.getResource(), this.getResourceResolver());
String previewVideoProxyUrl = scene7Service.getPreviewVideoServerUrl(this.getResource(), this.getResourceResolver());
String productionVideoServerUrl = scene7Service.getPublishVideoServerUrl(this.getResource(), this.getResourceResolver());
}
@Saravanan_Dharmaraj Where do I put this? I have the video and audio in my DAM.
According to the documentation you should use the "_dynamicUrl" field on the ImageRef, this is supposed to work only in AEMaaCS
Please let me know if that works
See more here:
@EstebanBustamante That works. Thank you
@EstebanBustamante How do I get _dynamicUrl for audio, video files? I'm not getting that in the Query editor.
I think for now you cannot use dynamic media for videos via GraphQL although i could be wrong.
Views
Likes
Replies