Get the download url of an asset | Community
Skip to main content
armanm32055672
Level 2
Oct 23, 2017 4:46 PM UTC
Solved

Get the download url of an asset

Hi,

I want to get the download URL of an particular to be referenced in href tag. For example, if I have an asset in this path /dam/downloads/name/name.pdf. How can I get the download link for this file?

Thank,

Ar

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Bhuwan08
Bhuwan08Accepted solution
Level 2
Oct 24, 2017 5:16 AM UTC

If your asset is residing under /content/dam/downloads/name/name.pdf then you can use download attribute.It download the file instead of opening it.

<a href="https://forums.adobe.com/content/dam/downloads/name/name.pdf" download="xyz"> Click here </a> will download the PDF.

Note: The download attribute is currently not supported in IE (see http://caniuse.com/#search=download%20attribute), it is only supported by firefox, chrome and the latest version of blackberry's browser.

2 replies

Bhuwan08
Bhuwan08Accepted solution
Level 2
Oct 24, 2017 5:16 AM UTC

If your asset is residing under /content/dam/downloads/name/name.pdf then you can use download attribute.It download the file instead of opening it.

<a href="https://forums.adobe.com/content/dam/downloads/name/name.pdf" download="xyz"> Click here </a> will download the PDF.

Note: The download attribute is currently not supported in IE (see http://caniuse.com/#search=download%20attribute), it is only supported by firefox, chrome and the latest version of blackberry's browser.

Translate
VeenaVikraman
New Participant
Oct 23, 2017 6:44 PM UTC

Hi Arman

  What do you mean by download link ? if your asset is residing under /content/dam/downloads/name/name.pdf , then if you give

<a href="https://forums.adobe.com/content/dam/downloads/name/name.pdf"> Click here </a> will open the PDF for you .

    To download PDF , you may have to write a separate logic because usually all browsers give you an option to save the PDF to you local.

Thanks

Veena

Translate