MDL-68342 files: Add a faster xsendfile method to avoid db lookups

This commit is contained in:
Brendan Heywood
2020-04-27 16:11:34 +10:00
parent 9df4a4de18
commit 5bf5a7aaeb
4 changed files with 32 additions and 1 deletions
+1 -1
View File
@@ -2169,7 +2169,7 @@ function readfile_accel($file, $mimetype, $accelerate) {
if (is_object($file)) {
$fs = get_file_storage();
if ($fs->supports_xsendfile()) {
if ($fs->xsendfile($file->get_contenthash())) {
if ($fs->xsendfile_file($file)) {
return;
}
}