X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/b3c9cd1820158293d52c6cc1bb7244fee06104ed..e25cf11c520c4e86bfd7d4f0944a146f0a21cf91:/file_download.php diff --git a/file_download.php b/file_download.php index fb9239ab..049003ba 100644 --- a/file_download.php +++ b/file_download.php @@ -55,14 +55,11 @@ if ($file['entity_type'] != 'project') { $fileHelper = new ttFileHelper($err); -$filename = $file['file_name']; -$mime_type = 'image/jpeg'; // Hardcoded type for now. TODO: fix this. - if ($fileHelper->getFile($file)) { header('Pragma: public'); // This is needed for IE8 to download files over https. - header('Content-Type: '.$mime_type); + header('Content-Type: application/octet-stream'); header('Expires: '.gmdate('D, d M Y H:i:s').' GMT'); - header('Content-Disposition: attachment; filename="'.$filename.'"'); + header('Content-Disposition: attachment; filename="'.$file['file_name'].'"'); header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); header('Cache-Control: private', false);