Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

Get the download url of an asset

Avatar

Level 3

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

1 Accepted Solution

Avatar

Correct answer by
Level 2

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.

View solution in original post

2 Replies

Avatar

Community Advisor

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

Avatar

Correct answer by
Level 2

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.