aboutsummaryrefslogtreecommitdiff
path: root/mod/file/download.php
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2011-06-24 03:59:22 -0700
committerCash Costello <cash.costello@gmail.com>2011-06-24 03:59:22 -0700
commit344e47862b1f39eca19e39a000f97f799cc87a12 (patch)
tree136b4f69afcc60da387bb84fbc74d7a049b32e42 /mod/file/download.php
parent60d69e25433b7b00d9c7f20db43b71c8978560c9 (diff)
parentd9485cb8e8982c668d7aa374f80ad2fa4c93753d (diff)
downloadelgg-344e47862b1f39eca19e39a000f97f799cc87a12.tar.gz
elgg-344e47862b1f39eca19e39a000f97f799cc87a12.tar.bz2
Merge pull request #33 from mcloughlin3/master
Fix bug #1932
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;