How to set PDFs to open inline using CMSGetFileDispositionInlineExtensions?

2024/10/03 1:43 PM

Hello,

I need to make sure all PDF's have the inline disposition header set.

I could not find where to set this nor could I find any docs online so any help is appreciated.

Thanks


Environment

Answers

2024/10/03 1:46 PM
Answer

Hi Alex

It sounds like you're using the getmedia handler for items in the media library, and the files are being treated as downloads rather than opening in a new tab?

I was looking the same situation earlier and found this app setting you can configure CMSGetFileDispositionInlineExtensions.

I configured it like this in my appsettings.json:

{
  "CMSGetFileDispositionInlineExtensions": "pdf"
}

Hopefully this helps for you too!

2025/01/20 8:22 AM

I'm sorry this is not an answer but I would like to reply to Liam's answer.

You are right in that it works!! I have confirmed that this would set the files with PDF extension to be inline. But I'm puzzled on how you found this? I can't find it in any documentation nor from the Kentico release notes.

Could you possible answer? Thanks.

2025/02/07 2:48 PM

Bob,

If you would like to see this setting documented share that as feedback on the documentation page for Xperience's Configuration Keys and our team will look at getting it added 👍.

There is a "Send us feedback" button at the bottom of every documentation page. That feedback goes straight to our education teams.

To answer this question, you have to login first.