AEM 6.3 - Automatic download from DAM via link. | Community
Skip to main content
Jeanmaradiaga
Level 3
Mar 22, 2021 9:33 PM UTC
Solved

AEM 6.3 - Automatic download from DAM via link.

Is there an easy way to automatically download a file (like a PDF) using the DAM's location in a anchor tag? For example:

 

<a href="my-site-stage/assetdetails.html/content/dam/tweed/pdf-files/TEST%20PDF.pdf">

Download instructions here

</a>

 

It seems like something that would be fairly common but clicking the link takes me to the DAM itself, where I have to first login and then find the donwload button and click it.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Pawan-Gupta
Pawan-GuptaAccepted solution
Level 8
Mar 22, 2021 9:55 PM UTC

hello, 

 

your path should be constructed to actual resource /content/dam/tweed/pdf-files/TEST%20PDF.pdf  (not prefixing my-site-stage/assetdetails.html which is for author mode) for public facing page (an i believe you want these files to be available on public. else, you need to put more constraint while generating link)

 

note: there are more stuff you can do when it comes to caching and supporting big file size.

 

thanks!!

3 replies

Pawan-Gupta
Pawan-GuptaAccepted solution
Level 8
Mar 22, 2021 9:55 PM UTC

hello, 

 

your path should be constructed to actual resource /content/dam/tweed/pdf-files/TEST%20PDF.pdf  (not prefixing my-site-stage/assetdetails.html which is for author mode) for public facing page (an i believe you want these files to be available on public. else, you need to put more constraint while generating link)

 

note: there are more stuff you can do when it comes to caching and supporting big file size.

 

thanks!!

Translate
Jeanmaradiaga
Level 3
Mar 22, 2021 10:40 PM UTC
Thanks!
Translate