From 78bee705ff70d23372a44929e7fc796657a72ece Mon Sep 17 00:00:00 2001 From: Sebastian Albert <60854302+albertvisuals@users.noreply.github.com> Date: Tue, 19 May 2026 09:30:49 +0200 Subject: [PATCH] Change storage to public disk for media uploads --- app/Models/Traits/HasMedia.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Models/Traits/HasMedia.php b/app/Models/Traits/HasMedia.php index c1b9cb5e..7fbb8590 100644 --- a/app/Models/Traits/HasMedia.php +++ b/app/Models/Traits/HasMedia.php @@ -88,7 +88,7 @@ public function addMedia(UploadedFile $file, string $collection = 'default', arr $filename = Str::uuid().'.'.$normalizedExt; $path = 'medias/'.$filename; - Storage::put($path, $normalizedBytes); + Storage::disk('public')->put($path, $normalizedBytes); return $this->media()->create([ 'group_id' => $groupId ?? Str::uuid()->toString(), @@ -126,7 +126,7 @@ public function addMediaFromPath(string $filePath, string $originalFilename, str $filename = Str::uuid().'.'.$normalizedExt; $storagePath = 'medias/'.$filename; - Storage::put($storagePath, $normalizedBytes); + Storage::disk('public')->put($storagePath, $normalizedBytes); return $this->media()->create([ 'group_id' => $groupId ?? Str::uuid()->toString(),