aboutsummaryrefslogtreecommitdiff
path: root/mod/file/download.php
diff options
context:
space:
mode:
authorcash <cash.costello@gmail.com>2011-06-24 13:42:07 -0400
committercash <cash.costello@gmail.com>2011-06-24 13:42:07 -0400
commit3c2f72753335a5ca793cf8250c4233d04689e5d2 (patch)
tree43fb542574f791bc47546e65e24f858c3eec0698 /mod/file/download.php
parent42e02f03c306717002aac0d36f0e2b48bf369fed (diff)
parentd701c3bdf59e2d326c27dd0567323e09a65c00f2 (diff)
downloadelgg-3c2f72753335a5ca793cf8250c4233d04689e5d2.tar.gz
elgg-3c2f72753335a5ca793cf8250c4233d04689e5d2.tar.bz2
Merge branch 'master' of github.com:Elgg/Elgg
Diffstat (limited to 'mod/file/download.php')
-rw-r--r--mod/file/download.php9
1 files changed, 4 insertions, 5 deletions
diff --git a/mod/file/download.php b/mod/file/download.php
index a386d490f..8e0287a1e 100644
--- a/mod/file/download.php
+++ b/mod/file/download.php
@@ -33,8 +33,7 @@ if (strpos($mime, "image/") !== false) {
header("Content-Disposition: attachment; filename=\"$filename\"");
}
-$contents = $file->grabFile();
-$splitString = str_split($contents, 8192);
-foreach ($splitString as $chunk) {
- echo $chunk;
-}
+ob_clean();
+flush();
+readfile($file->getFilenameOnFilestore());
+exit;