use sendFile() instead of readfile()

This commit is contained in:
Uwe Steinmann 2018-01-18 08:49:44 +01:00
parent 4cfd9f222e
commit d4af7b5c9a
2 changed files with 3 additions and 6 deletions

View File

@ -39,7 +39,7 @@ class SeedDMS_Controller_Download extends SeedDMS_Controller_Common {
header("Content-Type: " . $content->getMimeType());
header("Cache-Control: must-revalidate");
readfile($dms->contentDir . $content->getPath());
sendFile($dms->contentDir.$content->getPath());
}
}
break;

View File

@ -40,12 +40,9 @@ class SeedDMS_Controller_ViewOnline extends SeedDMS_Controller_Common {
header("Content-Disposition: filename=\"" . $efilename . "\"; filename*=UTF-8''".$efilename);
}
header("Content-Length: " . filesize($dms->contentDir . $content->getPath()));
header("Expires: 0");
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
header("Cache-Control: must-revalidate");
ob_clean();
readfile($dms->contentDir . $content->getPath());
sendFile($dms->contentDir.$content->getPath());
}
break;
}