From b97e72d587cb42a18ca3f0241a8474da3dbd3a0c Mon Sep 17 00:00:00 2001 From: David Bomba Date: Sat, 15 May 2021 12:31:17 +1000 Subject: [PATCH] Fixes for quotes and credit paths --- app/Services/Credit/GetCreditPdf.php | 11 ++--------- app/Services/Quote/GetQuotePdf.php | 11 ++--------- 2 files changed, 4 insertions(+), 18 deletions(-) diff --git a/app/Services/Credit/GetCreditPdf.php b/app/Services/Credit/GetCreditPdf.php index 84deac828d5f..9114ec5fdbc4 100644 --- a/app/Services/Credit/GetCreditPdf.php +++ b/app/Services/Credit/GetCreditPdf.php @@ -41,16 +41,9 @@ class GetCreditPdf extends AbstractService $file_path = $path.$this->credit->numberFormatter().'.pdf'; - $disk = config('filesystems.default'); + $disk = 'public'; - $file = Storage::disk($disk)->exists($file_path); - - if (! $file) { - $file_path = CreateEntityPdf::dispatchNow($this->invitation); - } - - if(config('filesystems.default') == 's3') - return TempFile::path(Storage::disk($disk)->url($file_path)); + $file_path = CreateEntityPdf::dispatchNow($this->invitation); return Storage::disk($disk)->path($file_path); } diff --git a/app/Services/Quote/GetQuotePdf.php b/app/Services/Quote/GetQuotePdf.php index 2d8b62539c66..7990c81a9877 100644 --- a/app/Services/Quote/GetQuotePdf.php +++ b/app/Services/Quote/GetQuotePdf.php @@ -39,16 +39,9 @@ class GetQuotePdf extends AbstractService $file_path = $path.$this->quote->numberFormatter().'.pdf'; - $disk = config('filesystems.default'); + $disk = 'public'; - $file = Storage::disk($disk)->exists($file_path); - - if (! $file) { - $file_path = CreateEntityPdf::dispatchNow($invitation); - } - - if(config('filesystems.default') == 's3') - return TempFile::path(Storage::disk($disk)->url($file_path)); + $file_path = CreateEntityPdf::dispatchNow($invitation); return Storage::disk($disk)->path($file_path); }