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); }