improved directory handling and PDF compatibility SC#5

This commit is contained in:
skodak
2004-12-15 22:18:48 +00:00
parent 92a89ca210
commit 8eca7e454f
+2 -1
View File
@@ -51,7 +51,7 @@
$filename = $fileargs[0]; // Only keep what's before the '?'
}
if (file_exists($pathname)) {
if (file_exists($pathname) and !is_dir($pathname)) {
$lastmodified = filemtime($pathname);
$mimetype = mimeinfo("type", $filename);
@@ -60,6 +60,7 @@
header("Cache-control: max_age = $CFG->filelifetime");
header("Pragma: ");
header("Content-disposition: inline; filename=$filename");
header('Accept-Ranges: none');
if (empty($CFG->filteruploadedfiles)) {