X-Git-Url: https://git.cweiske.de/phorkie.git/blobdiff_plain/39bd200baed00b5b63cc62ce947ef708710ac81c..c1ab5bf5ad85fee72dca6c6cea3bffef3003a1cb:/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(); +} ?>