Merge pull request #5782 from turbo124/v5-develop

Enable previewing Recurring invoice pdfs
This commit is contained in:
David Bomba 2021-05-22 13:09:55 +10:00 committed by GitHub
commit 31c5f36a43
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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