mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-02-21 04:19:41 +08:00
Change check to verify that request is present and contains a file
This commit is contained in:
parent
01b95d91ba
commit
5cd56f63ff
@ -57,7 +57,7 @@ class SettingController extends Controller
|
||||
}
|
||||
|
||||
// Update logo image if set
|
||||
if ($request->has('app_logo')) {
|
||||
if ($request->hasFile('app_logo')) {
|
||||
$logoFile = $request->file('app_logo');
|
||||
$this->imageRepo->destroyByType('system');
|
||||
$image = $this->imageRepo->saveNew($logoFile, 'system', 0, null, 86);
|
||||
|
@ -191,7 +191,7 @@ class UserController extends Controller
|
||||
}
|
||||
|
||||
// Save profile image if in request
|
||||
if ($request->has('profile_image')) {
|
||||
if ($request->hasFile('profile_image')) {
|
||||
$imageUpload = $request->file('profile_image');
|
||||
$this->imageRepo->destroyImage($user->avatar);
|
||||
$image = $this->imageRepo->saveNew($imageUpload, 'user', $user->id);
|
||||
|
Loading…
x
Reference in New Issue
Block a user