diff --git a/controllers/email_attachments_controller.php b/controllers/email_attachments_controller.php index a50dd71b..1ccd22ef 100755 --- a/controllers/email_attachments_controller.php +++ b/controllers/email_attachments_controller.php @@ -10,13 +10,11 @@ class EmailAttachmentsController extends AppController { $file = $this->EmailAttachment->findById($id); header('Content-type: ' . $file['EmailAttachment']['type']); header('Content-length: ' . $file['EmailAttachment']['size']); - header('Content-Disposition: attachment; filename='.basename($file['EmailAttachment']['name'])); - header('Content-Transfer-Encoding: binary'); - header('Expires: 0'); - header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); - ob_clean(); - flush(); - readfile($file['EmailAttachment']['name']); + header('Content-Disposition: attachment; filename='.$file['EmailAttachment']['name']); + + // ob_clean(); + // flush(); + readfile($file['EmailAttachment']['filename']); // echo $file['EmailAttachment']['filename'] exit(); }