Get the download url of an asset

armanm32055672

23-10-2017

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

Accepted Solutions (1)

Accepted Solutions (1)

Bhuwan08

23-10-2017

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.

Answers (1)

Answers (1)

Veena_Vikram

MVP

23-10-2017

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