mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-03-11 16:35:38 +00:00
use sendFile() instead of readfile()
This commit is contained in:
parent
ccb56e827c
commit
97ff9abee5
|
@ -878,7 +878,7 @@ function getDocumentContent($id) { /* {{{ */
|
|||
$app->response()->header("Cache-Control", "no-cache, must-revalidate");
|
||||
$app->response()->header("Pragma", "no-cache");
|
||||
|
||||
readfile($dms->contentDir . $lc->getPath());
|
||||
sendFile($dms->contentDir . $lc->getPath());
|
||||
} else {
|
||||
$app->response()->status(403);
|
||||
$app->response()->header('Content-Type', 'application/json');
|
||||
|
@ -953,7 +953,7 @@ function getDocumentVersion($id, $version) { /* {{{ */
|
|||
$app->response()->header("Cache-Control", "no-cache, must-revalidate");
|
||||
$app->response()->header("Pragma", "no-cache");
|
||||
|
||||
readfile($dms->contentDir . $lc->getPath());
|
||||
sendFile($dms->contentDir . $lc->getPath());
|
||||
} else {
|
||||
$app->response()->status(403);
|
||||
$app->response()->header('Content-Type', 'application/json');
|
||||
|
@ -1022,7 +1022,7 @@ function getDocumentFile($id, $fileid) { /* {{{ */
|
|||
$app->response()->header("Cache-Control", "no-cache, must-revalidate");
|
||||
$app->response()->header("Pragma", "no-cache");
|
||||
|
||||
readfile($dms->contentDir . $file->getPath());
|
||||
sendFile($dms->contentDir . $file->getPath());
|
||||
} else {
|
||||
$app->response()->status(403);
|
||||
$app->response()->header('Content-Type', 'application/json');
|
||||
|
|
Loading…
Reference in New Issue
Block a user