diff --git a/app/Jobs/Entity/CreateEntityPdf.php b/app/Jobs/Entity/CreateEntityPdf.php index a4490df40a..6c3d944bf9 100644 --- a/app/Jobs/Entity/CreateEntityPdf.php +++ b/app/Jobs/Entity/CreateEntityPdf.php @@ -193,9 +193,11 @@ class CreateEntityPdf implements ShouldQueue try{ - if(!Storage::exists($path)) - Storage::makeDirectory($path, 0775); + if(!Storage::disk(config('filesystems.default'))->exists($path)) + Storage::disk(config('filesystems.default'))->makeDirectory($path, 0775); + nlog($file_path); + Storage::disk($this->disk)->put($file_path, $pdf); } diff --git a/app/Utils/PhantomJS/Phantom.php b/app/Utils/PhantomJS/Phantom.php index 90e25917c2..2b53673042 100644 --- a/app/Utils/PhantomJS/Phantom.php +++ b/app/Utils/PhantomJS/Phantom.php @@ -90,8 +90,8 @@ class Phantom $this->checkMime($pdf, $invitation, $entity); - if(!Storage::exists($path)) - Storage::makeDirectory($path, 0775); + if(!Storage::disk(config('filesystems.default'))->exists($path)) + Storage::disk(config('filesystems.default'))->makeDirectory($path, 0775); $instance = Storage::disk(config('filesystems.default'))->put($file_path, $pdf);