Seriously, fuck this
This commit is contained in:
parent
29c3a6051a
commit
e42e11a516
|
|
@ -10,13 +10,11 @@ class EmailAttachmentsController extends AppController {
|
||||||
$file = $this->EmailAttachment->findById($id);
|
$file = $this->EmailAttachment->findById($id);
|
||||||
header('Content-type: ' . $file['EmailAttachment']['type']);
|
header('Content-type: ' . $file['EmailAttachment']['type']);
|
||||||
header('Content-length: ' . $file['EmailAttachment']['size']);
|
header('Content-length: ' . $file['EmailAttachment']['size']);
|
||||||
header('Content-Disposition: attachment; filename='.basename($file['EmailAttachment']['name']));
|
header('Content-Disposition: attachment; filename='.$file['EmailAttachment']['name']);
|
||||||
header('Content-Transfer-Encoding: binary');
|
|
||||||
header('Expires: 0');
|
// ob_clean();
|
||||||
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
|
// flush();
|
||||||
ob_clean();
|
readfile($file['EmailAttachment']['filename']);
|
||||||
flush();
|
|
||||||
readfile($file['EmailAttachment']['name']);
|
|
||||||
// echo $file['EmailAttachment']['filename']
|
// echo $file['EmailAttachment']['filename']
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue