We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1adaece + ed9b797 commit 1c49993Copy full SHA for 1c49993
public_html/lists/dl.php
@@ -65,7 +65,12 @@
65
}
66
67
list($fname, $ext) = explode('.', basename($data[2]));
68
- header('Content-Disposition: attachment; filename="'.basename($data[2]).'"');
+ $undirect_mime_types = array('pdf');
69
+ $the_mime_types = explode("/", $data[1]);
70
+ if ($the_mime_types[0] == 'application' && in_array($the_mime_types[1], $undirect_mime_types))
71
+ header ('Content-Disposition: inline; filename="'.basename($data[2]).'"');
72
+ else
73
+ header('Content-Disposition: attachment; filename="'.basename($data[2]).'"');
74
if ($data[4]) {
75
$size = $data[4];
76
} else {
0 commit comments