Skip to content

Commit

Permalink
Fix upload paths
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Hunt committed Feb 18, 2024
1 parent d184427 commit fb7f9de
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/Http/Controllers/ItemController.php
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ public static function storelogic(Request $request, $id = null): Item
]);

if ($request->hasFile('file')) {
$path = $request->file('file')->store('icons');
$path = $request->file('file')->store('icons', 'public');
$request->merge([
'icon' => $path,
]);
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/SettingsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public function update(Request $request, int $id): RedirectResponse
);
}

$path = $request->file('value')->store('backgrounds');
$path = $request->file('value')->store('backgrounds', 'public');

if ($path === null) {
throw new \Exception('file_not_stored');
Expand Down
4 changes: 2 additions & 2 deletions app/Http/Controllers/TagController.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function store(Request $request): RedirectResponse
]);

if ($request->hasFile('file')) {
$path = $request->file('file')->store('icons');
$path = $request->file('file')->store('icons', 'public');
$request->merge([
'icon' => $path,
]);
Expand Down Expand Up @@ -123,7 +123,7 @@ public function update(Request $request, int $id): RedirectResponse
]);

if ($request->hasFile('file')) {
$path = $request->file('file')->store('icons');
$path = $request->file('file')->store('icons', 'public');
$request->merge([
'icon' => $path,
]);
Expand Down
4 changes: 2 additions & 2 deletions app/Http/Controllers/UserController.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public function store(Request $request): RedirectResponse
}

if ($request->hasFile('file')) {
$path = $request->file('file')->store('avatars');
$path = $request->file('file')->store('avatars', 'public');
$user->avatar = $path;
}

Expand Down Expand Up @@ -128,7 +128,7 @@ public function update(Request $request, User $user): RedirectResponse
}

if ($request->hasFile('file')) {
$path = $request->file('file')->store('avatars');
$path = $request->file('file')->store('avatars', 'public');
$user->avatar = $path;
}

Expand Down

0 comments on commit fb7f9de

Please sign in to comment.