diff options
Diffstat (limited to 'inc')
-rw-r--r-- | inc/util.inc.php | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/inc/util.inc.php b/inc/util.inc.php index 3d912f80..c33bbc83 100644 --- a/inc/util.inc.php +++ b/inc/util.inc.php @@ -381,19 +381,8 @@ SADFACE; } Header('Content-Type: application/octet-stream', true); Header('Content-Disposition: attachment; filename=' . str_replace(array(' ', '=', ',', '/', '\\', ':', '?'), '_', iconv('UTF-8', 'ASCII//TRANSLIT', $name))); - Header('Content-Length: ' . @filesize($file)); - while (!feof($fh)) { - $data = fread($fh, 16000); - if ($data === false) { - echo "\r\n\nDOWNLOAD INTERRUPTED!\n"; - if ($delete) - @unlink($file); - return true; - } - echo $data; - @ob_flush(); - @flush(); - } + Header('Content-Length: ' . filesize($file)); + fpassthru($fh); fclose($fh); if ($delete) { unlink($file); |