Skip to content

Commit

Permalink
Merge pull request #1291 from KodeStar/2.x
Browse files Browse the repository at this point in the history
Fix upload paths
  • Loading branch information
KodeStar authored Feb 18, 2024
2 parents 002bae3 + fb7f9de commit 809a997
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 @@ -211,7 +211,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 809a997

Please sign in to comment.