From e552e6353a37e74d6704016f3e07c36a47421704 Mon Sep 17 00:00:00 2001 From: Karl Cordes Date: Thu, 4 Jul 2019 16:48:56 +1000 Subject: [PATCH] Disable debug to see if it fixes email attachments --- app/config/core.php | 2 +- app/controllers/email_attachments_controller.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/config/core.php b/app/config/core.php index 9c493ba9..45902751 100644 --- a/app/config/core.php +++ b/app/config/core.php @@ -41,7 +41,7 @@ error_reporting(E_ALL & ~E_STRICT & ~E_DEPRECATED); * In production mode, flash messages redirect after a time interval. * In development mode, you need to click the flash message to continue. */ -Configure::write('debug', 1); +Configure::write('debug', 0); Configure::write('version', '1.0.1'); diff --git a/app/controllers/email_attachments_controller.php b/app/controllers/email_attachments_controller.php index 838cfb4d..f56bb679 100755 --- a/app/controllers/email_attachments_controller.php +++ b/app/controllers/email_attachments_controller.php @@ -26,7 +26,7 @@ class EmailAttachmentsController extends AppController { } header('Content-type: ' . $file['EmailAttachment']['type']); - header('Content-length: ' . filesize($file['EmailAttachment']['name'])); + header('Content-length: ' . $file['EmailAttachment']['size']; header('Content-Disposition: attachment; filename='.$filename); readfile($file_path."/".$file['EmailAttachment']['name']);