Link to a pdf file

Enonic version: 6.x
OS: centos


On an enonic XP site I upload a pdf file with Content Studio. I would like to make this file readable for public. How can we refer to this file as a link? The file was uploaded as media content.

The designed link would be something like
It seems that there is no simple way to do this.


Hi! Use attachmentUrl function to get link to the file.

On XP 6.x you can combine tsi’s suggestion above with the Attachment Viewer application from Enonic Market, which lets you view the attachmentUrl to the PDF inline in the browser instead of downloading it.

(The app has become redundant in Enonic XP 7.x)

1 Like