aboutsummaryrefslogtreecommitdiff
path: root/mod/file/download.php
diff options
context:
space:
mode:
authorRussell McLoughlin <mcloughlin3@llnl.gov>2011-06-01 13:16:39 -0700
committerRussell McLoughlin <mcloughlin3@llnl.gov>2011-06-01 13:16:39 -0700
commit5ce0b61f361809949f88fcd6566eebc3abb2c8df (patch)
treeea65260c7a06465bf30a60215da4be33e8cdbd93 /mod/file/download.php
parent2850bfb915fa5dc28d290910cba1c97b0c7e3b50 (diff)
downloadelgg-5ce0b61f361809949f88fcd6566eebc3abb2c8df.tar.gz
elgg-5ce0b61f361809949f88fcd6566eebc3abb2c8df.tar.bz2
Modified upload script to guarentee that the directory under elgg data is created or exists. Removed strange chunking code with builtin php function
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;