1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00

Fixes for the way we attach documents/pdfs to puchase orders

This commit is contained in:
David Bomba 2022-12-04 17:37:31 +11:00
parent 850617f32c
commit 3aa5db7198

View File

@ -141,7 +141,13 @@ class VendorTemplateEmail extends Mailable
// $this->attach($file['path'], ['as' => $file['name'], 'mime' => null]);
// }
$this->attachData(base64_decode($file['file']), $file['name']);
// $this->attachData(base64_decode($file['file']), $file['name']);
if(array_key_exists('file', $file))
$this->attachData(base64_decode($file['file']), $file['name']);
else
$this->attach($file['path'], ['as' => $file['name'], 'mime' => null]);
}