How to set PDFs to open inline using CMSGetFileDispositionInlineExtensions?
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
- Xperience by Kentico version 29.3.1
- .NET version: [8]
- Deployment environment: Azure
- Link to relevant Xperience by Kentico documentation
Answers
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!
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.
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.