diff --git a/htdocs/document.php b/htdocs/document.php index 64c811e4cb1..e0c71755f52 100644 --- a/htdocs/document.php +++ b/htdocs/document.php @@ -25,7 +25,14 @@ $original_file = urldecode($_GET["file"]); $filename = basename ($original_file); -header('Content-type: application/pdf'); +if ($_GET["type"]) +{ + header('Content-type: '.$_GET["type"]); +} +else +{ + header('Content-type: application/pdf'); +} header('Content-Disposition: attachment; filename="'.$filename.'"');