Whenever a d Dam Document is downloaded to the visitor’s system, the local file reflects the DAM asset’s actual Name property

Avatar

Avatar

saurabhs5999723

Avatar

saurabhs5999723

saurabhs5999723

17-05-2019

HI All,

I have a requirement where the client wants us to do the following

Whenever a document is downloaded to the visitor’s system, the local file reflects the DAM asset’s actual Name property.

For example, a visitor clicks a link for this URL: https://www.abcdef.com/ca/en/assets/ndx/flyers/frobnitz-buy-one-get-onefree/7119-1127.pdf

The  PDF is shown in the visitor’s browser.

If the visitor then saves or downloads the PDF, the file stored on their system has this file name: frobnitz-buy-one-get-one-free.pdf

Replies

Avatar

Avatar

Bharath_valse

Avatar

Bharath_valse

Bharath_valse

17-05-2019

If I understand correctly, file name needs be the folder name (frobnitz-buy-one-get-one-free.pdf) instead of the actual node name(119-1127.pdf) in jcr. You could look for some existing browser plugins to change the file name on the fly post download or develop one as per requirement. Not certain if this can be achieved server side

Avatar

Avatar

saurabhs5999723

Avatar

saurabhs5999723

saurabhs5999723

17-05-2019

This is not browser specific. But if you can point me to something, I can try

Avatar

Avatar

kunal23

MVP

Avatar

kunal23

MVP

kunal23
MVP

17-05-2019

You can use download attribute in HTML5 for this requirement- HTML a download Attribute 

If the above does not work then you can write a custom filter to rewrite the content disposition header value for all PDF request URLs.