From 0ce7ca6f26c81a61cc99c18f74c2df6006178183 Mon Sep 17 00:00:00 2001 From: Karl Cordes Date: Thu, 4 Jul 2019 16:42:24 +1000 Subject: [PATCH] Trying this to fix PDF attachments. Doesnt make much sense but whatever --- app/controllers/email_attachments_controller.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/email_attachments_controller.php b/app/controllers/email_attachments_controller.php index 141af1a1..2e727d21 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: ' . $file['EmailAttachment']['size']); + header('Content-length: ' . filesize($file['EmailAttachment']['name']); header('Content-Disposition: attachment; filename='.$filename); readfile($file_path."/".$file['EmailAttachment']['name']);