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!

To answer this question, you have to login first.