diff --git a/app/Jobs/Entity/CreateEntityPdf.php b/app/Jobs/Entity/CreateEntityPdf.php index 6c3d944bf97e..1d20f5716a73 100644 --- a/app/Jobs/Entity/CreateEntityPdf.php +++ b/app/Jobs/Entity/CreateEntityPdf.php @@ -193,8 +193,8 @@ class CreateEntityPdf implements ShouldQueue try{ - if(!Storage::disk(config('filesystems.default'))->exists($path)) - Storage::disk(config('filesystems.default'))->makeDirectory($path, 0775); + if(!Storage::disk($this->disk)->exists($path)) + Storage::disk($this->disk)->makeDirectory($path, 0775); nlog($file_path); diff --git a/app/Services/Invoice/GenerateDeliveryNote.php b/app/Services/Invoice/GenerateDeliveryNote.php index c416e5e34a53..9f324680f6ec 100644 --- a/app/Services/Invoice/GenerateDeliveryNote.php +++ b/app/Services/Invoice/GenerateDeliveryNote.php @@ -106,8 +106,8 @@ class GenerateDeliveryNote info($maker->getCompiledHTML()); } - if(!Storage::exists($this->invoice->client->invoice_filepath($invitation))) - Storage::makeDirectory($this->invoice->client->invoice_filepath($invitation), 0775); + if(!Storage::disk($this->disk)->exists($this->invoice->client->invoice_filepath($invitation))) + Storage::disk($this->disk)->makeDirectory($this->invoice->client->invoice_filepath($invitation), 0775); Storage::disk($this->disk)->put($file_path, $pdf);