From 935d86ce559a8ca3a45d2d5b4329706e955e39ee Mon Sep 17 00:00:00 2001 From: Karl Cordes Date: Tue, 27 Apr 2010 17:05:36 +1000 Subject: [PATCH] Hm. Downloader still busted --- controllers/email_attachments_controller.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/controllers/email_attachments_controller.php b/controllers/email_attachments_controller.php index ab087024..0dcfddc4 100755 --- a/controllers/email_attachments_controller.php +++ b/controllers/email_attachments_controller.php @@ -11,10 +11,13 @@ class EmailAttachmentsController extends AppController { 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(); + flush(); readfile($file['EmailAttachment']['filename']); - // echo $file['EmailAttachment']['filename'] + // echo $file['EmailAttachment']['filename'] exit(); }