projects
/
timetracker.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
More work in progress on time record attachments.
[timetracker.git]
/
file_download.php
diff --git
a/file_download.php
b/file_download.php
index
fb9239a
..
049003b
100644
(file)
--- a/
file_download.php
+++ b/
file_download.php
@@
-55,14
+55,11
@@
if ($file['entity_type'] != 'project') {
$fileHelper = new ttFileHelper($err);
$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.
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('Expires: '.gmdate('D, d M Y H:i:s').' GMT');
- header('Content-Disposition: attachment; filename="'.$file
name
.'"');
+ header('Content-Disposition: attachment; filename="'.$file
['file_name']
.'"');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Cache-Control: private', false);
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Cache-Control: private', false);