Trying this to fix PDF attachments. Doesnt make much sense but whatever

This commit is contained in:
Karl Cordes 2019-07-04 16:42:24 +10:00
parent 5610d7d52d
commit 0ce7ca6f26

View file

@ -26,7 +26,7 @@ class EmailAttachmentsController extends AppController {
} }
header('Content-type: ' . $file['EmailAttachment']['type']); 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); header('Content-Disposition: attachment; filename='.$filename);
readfile($file_path."/".$file['EmailAttachment']['name']); readfile($file_path."/".$file['EmailAttachment']['name']);