• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

MetaMimeType: View PDF Attachments in-browser 0.2a

No permission to download
Alters the MIME type of .pdf and .txt files so they display in the browser instead of downloading.

Mick West

Well-known member
#1
Mick West submitted a new resource:

MetaMimeType Inline PDF Attachments - Alters the MIME type of .pdf and .txt files so they display in the browser

By default XenForo gives all non-image attachments the MIME type of '
application/octet-stream' - things means that attachments such as .pdf and .txt files will act like binary files, and not be opened by the browser (instead they will be downloaded, and you have to open the downloaded file).

MetaMimeType is a small patch to replace the MIME type on .pdf and .txt attachments files so they display correctly.

The types are set in MetaMimeType_ViewPublic_Attachment_View in
Code:
...
Read more about this resource...
 

RoldanLT

Well-known member
#3
It's better if you can make this:
Code:
     $mimeTypes = array(
                'pdf' => 'application/pdf',
                'txt' => 'text/plain',
        );
As an admin option/settings so that we can add as many as we want easily.
 
#19
Thanks for creating this. My users on iOS were having difficulties viewing PDF files.

This is working fine on 1.4 in case anyone is wondering.