Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

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

saurabhs5999723
Level 2
Level 2

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

3 Replies
Bharath_valse
Level 4
Level 4

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

saurabhs5999723
Level 2
Level 2

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

kunal23
Level 10
Level 10

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.