Highlighted

Assets - Link to published asset from the author?

crazy4aem

04-02-2019

Is there a way to view the URL/link to a published asset from the author?

In other words, I am after the URL of the asset on the publisher. I know there are ways of sharing assets, generating URL's and embed code. However, none of them link to the raw file on the publisher.

Replies

Highlighted

Gaurav-Behl

MVP

04-02-2019

I'm not able to understand why would the url change for publish server apart from the "domain/host name/port"? Could you elaborate with an example?

Highlighted

crazy4aem

04-02-2019

Thanks for the reply.

You are absolutely correct that the only change for a published asset would be the hostname/port. I'm asking mainly for authors/content producers that may not be familiar or even care about the AEM system stack. In other words, if a content producer uploads an asset, publishes it, and wants a direct link to the file there doesn't seem to be a way to pull it in the UI.

Highlighted

Gaurav-Behl

MVP

04-02-2019

You may use externalizer for this use case - Externalizing URLs

Configure the domains in /system/console/configMgr

To externalize a path with the 'publish' domain:

String myExternalizedUrl = externalizer.publishLink(resolver, "/my/page") + ".html";

Assuming the domain mapping "publish http://www.website.com", myExternalizedUrl ends up with the value "http://www.website.com/contextpath/my/page.html".