diff --git a/lib/download.php b/lib/download.php index 4b15235..1085d96 100644 --- a/lib/download.php +++ b/lib/download.php @@ -1,26 +1,17 @@ ICEcoder.message('Sorry, that file doesn\'t appear to exist');"); } -if (true === file_exists($file)) { - header("Pragma: public"); - header("Expires: 0"); - header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); - header("Cache-Control: public"); - header('Content-Description: File Transfer'); - header("Content-Type: application/octet-stream"); - header('Content-Disposition: attachment; filename=' . basename($file)); - // header("Content-Transfer-Encoding: binary"); - header('Content-Length: ' . filesize($file)); - ob_clean(); - flush(); - readfile($file); +if (true === file_exists($filePath)) { + $file = new File(); + $file->download($filePath); exit; } diff --git a/lib/icecoder.php b/lib/icecoder.php index 704ae51..1b4d144 100644 --- a/lib/icecoder.php +++ b/lib/icecoder.php @@ -1,7 +1,11 @@