From 9652c558347d0ba5bb0653023d1e56fd6bbddf56 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Sat, 22 May 2021 13:09:28 +1000 Subject: [PATCH] Enable previewing Recurring invoice pdfs --- app/Services/Recurring/GetInvoicePdf.php | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/app/Services/Recurring/GetInvoicePdf.php b/app/Services/Recurring/GetInvoicePdf.php index 336e57635b55..6c4b6dee2236 100644 --- a/app/Services/Recurring/GetInvoicePdf.php +++ b/app/Services/Recurring/GetInvoicePdf.php @@ -41,7 +41,7 @@ class GetInvoicePdf extends AbstractService $file_path = $path.$this->entity->hashed_id.'.pdf'; - $disk = config('filesystems.default'); + $disk = 'public'; $file = Storage::disk($disk)->exists($file_path); @@ -49,12 +49,6 @@ class GetInvoicePdf extends AbstractService $file_path = CreateEntityPdf::dispatchNow($invitation); } - - /* Copy from remote disk to local when using cloud file storage. */ - 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); } }