Nil Pun
Nil Pun

Reputation: 17373

Sitecore show .pdf extension on download link

Noticed that out of box, the sitecore renders images, pdf or any doc with .ashx extension.

Would be nice to preserve the item's original extension e.g. bla.pdf

Could someone please advise what's the best way to achieve this without any adverse impact?

I've seen implementation below:

<setting name="Media.RequestExtension" value="" /> 

Not sure whether there would be any adverse impact on performance or similar.

Upvotes: 3

Views: 486

Answers (1)

Jan Bluemink
Jan Bluemink

Reputation: 3487

The setting you refer to is the correct one. There is no major adverse impact.

<setting name="Media.RequestExtension" value="" /> 

And the old url with .ashx also continues to work. It is not on by default it is something from the past, compatiblity it takes a wildcard mapping to the ASP.NET ISAPI dll.

If you want to optimize for performance you can take a look to this Performance degradation when the media link prefix contains tilde

Upvotes: 3

Related Questions