diff options
Diffstat (limited to 'application/models')
-rw-r--r-- | application/models/file_mod.php | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/application/models/file_mod.php b/application/models/file_mod.php index 54fe3d550..f13fd40b8 100644 --- a/application/models/file_mod.php +++ b/application/models/file_mod.php @@ -254,17 +254,9 @@ class File_mod extends CI_Model { || filesize($file) > $this->config->item('upload_max_text_size') ) { if ($mode == 'plain') { - header("Content-Type: text/plain\n"); - } else { - header("Content-Type: ".$type."\n"); - } - header("Content-disposition: inline; filename=\"".$filedata['filename']."\"\n"); - header("Content-Length: ".filesize($file)."\n"); - $fp = fopen($file,"r"); - while (!feof($fp)) { - echo fread($fp,4096); + $type = "text/plain"; } - fclose($fp); + rangeDownload($file, $filedata["filename"], $type); exit(); } |