X-Git-Url: https://git.cweiske.de/phorkie.git/blobdiff_plain/39bd200baed00b5b63cc62ce947ef708710ac81c..53e6e11d2b3ffd73abdd166c3a3d983479fc3040:/www/raw.php diff --git a/www/raw.php b/www/raw.php index 28f7c56..8bda11e 100644 --- a/www/raw.php +++ b/www/raw.php @@ -17,5 +17,10 @@ if ($mimetype === null) { $mimetype = 'text/plain'; } header('Content-Type: ' . $mimetype); -readfile($file->getFullPath()); +if ($repo->hash === null) { + //IIRC readfile is not so memory-intensive for big files + readfile($file->getFullPath()); +} else { + echo $file->getContent(); +} ?>