From 3883fb6d3ce2694d4277ed76bff1601f5499bf0c Mon Sep 17 00:00:00 2001 From: David Bomba Date: Sat, 16 Aug 2025 16:30:51 +1000 Subject: [PATCH] Explicitly use document disk path --- app/Http/Controllers/ClientController.php | 2 +- app/Models/Client.php | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/ClientController.php b/app/Http/Controllers/ClientController.php index 73345518a6..094ea8c9b4 100644 --- a/app/Http/Controllers/ClientController.php +++ b/app/Http/Controllers/ClientController.php @@ -329,7 +329,7 @@ class ClientController extends BaseController //delete all documents $client->documents->each(function ($document) { try { - Storage::disk(config('filesystems.default'))->delete($document->url); + Storage::disk($document->disk)->delete($document->url); } catch (\Exception $e) { nlog($e->getMessage()); } diff --git a/app/Models/Client.php b/app/Models/Client.php index 1cdec93974..dc378f0334 100644 --- a/app/Models/Client.php +++ b/app/Models/Client.php @@ -926,7 +926,12 @@ class Client extends BaseModel implements HasLocalePreference { return $this->company->company_key.'/'; } - + + /** + * document_filepath + * @deprecated. not used. + * @return string + */ public function document_filepath(): string { return $this->company->company_key.'/documents/';