Skip to content

Commit 809a997

Browse files
authored
Merge pull request #1291 from KodeStar/2.x
Fix upload paths
2 parents 002bae3 + fb7f9de commit 809a997

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

app/Http/Controllers/ItemController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ public static function storelogic(Request $request, $id = null): Item
211211
]);
212212

213213
if ($request->hasFile('file')) {
214-
$path = $request->file('file')->store('icons');
214+
$path = $request->file('file')->store('icons', 'public');
215215
$request->merge([
216216
'icon' => $path,
217217
]);

app/Http/Controllers/SettingsController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public function update(Request $request, int $id): RedirectResponse
7777
);
7878
}
7979

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

8282
if ($path === null) {
8383
throw new \Exception('file_not_stored');

app/Http/Controllers/TagController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function store(Request $request): RedirectResponse
5858
]);
5959

6060
if ($request->hasFile('file')) {
61-
$path = $request->file('file')->store('icons');
61+
$path = $request->file('file')->store('icons', 'public');
6262
$request->merge([
6363
'icon' => $path,
6464
]);
@@ -123,7 +123,7 @@ public function update(Request $request, int $id): RedirectResponse
123123
]);
124124

125125
if ($request->hasFile('file')) {
126-
$path = $request->file('file')->store('icons');
126+
$path = $request->file('file')->store('icons', 'public');
127127
$request->merge([
128128
'icon' => $path,
129129
]);

app/Http/Controllers/UserController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public function store(Request $request): RedirectResponse
6868
}
6969

7070
if ($request->hasFile('file')) {
71-
$path = $request->file('file')->store('avatars');
71+
$path = $request->file('file')->store('avatars', 'public');
7272
$user->avatar = $path;
7373
}
7474

@@ -128,7 +128,7 @@ public function update(Request $request, User $user): RedirectResponse
128128
}
129129

130130
if ($request->hasFile('file')) {
131-
$path = $request->file('file')->store('avatars');
131+
$path = $request->file('file')->store('avatars', 'public');
132132
$user->avatar = $path;
133133
}
134134

0 commit comments

Comments
 (0)