CMS MADE SIMPLE FORGE

Uploads

 

[#11931] Inline PDF's

avatar
Created By: Darren Kierman (kierweb)
Date Submitted: 2018-11-23 06:44

Assigned To:
Resolution: None
State: Open
Summary:
Inline PDF's
Detailed Description:
Any change of doing the following  in action.getfile.php (maybe via an option),
so PDF's are viewable within the browser.

$ext = substr($file, -3);
if ($ext == "pdf") {
        header('Content-Type: application/pdf');
        header("Content-Disposition:inline; filename=\"$bn\"" );
} else {
        header('Content-Type: application/octet-stream');
        header("Content-Disposition: attachment; filename=\"$bn\"" );
}

History