From 97ff9abee57ab6943e084fdbda9a32f79c8e2ffc Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 18 Jan 2018 08:49:00 +0100 Subject: [PATCH] use sendFile() instead of readfile() --- restapi/index.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/restapi/index.php b/restapi/index.php index 1aca291b6..5013842d5 100644 --- a/restapi/index.php +++ b/restapi/index.php @@ -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');