Change storage to public disk for media uploads
This commit is contained in:
parent
15cbe9616f
commit
78bee705ff
1 changed files with 2 additions and 2 deletions
|
|
@ -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(),
|
||||
|
|
|
|||
Loading…
Reference in a new issue