diff --git a/app/Services/Invoice/GetInvoicePdf.php b/app/Services/Invoice/GetInvoicePdf.php index 4ea7d6459a7c..0b7abf1cc7e9 100644 --- a/app/Services/Invoice/GetInvoicePdf.php +++ b/app/Services/Invoice/GetInvoicePdf.php @@ -47,10 +47,10 @@ class GetInvoicePdf extends AbstractService $file_path = CreateEntityPdf::dispatchNow($invitation); } - - return TempFile::path(Storage::disk($disk)->url($file_path)); + if(config('filesystems.default') == 's3') + return TempFile::path(Storage::disk($disk)->url($file_path)); // return Storage::disk($disk)->url($file_path); - // return Storage::disk($disk)->path($file_path); + return Storage::disk($disk)->path($file_path); } }