mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-11-26 15:32:13 +00:00
use sendFile() instead of readfile()
This commit is contained in:
parent
4cfd9f222e
commit
d4af7b5c9a
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user