3
0
mirror of https://github.com/snipe/snipe-it.git synced 2026-05-05 22:25:34 +00:00

Add image upload to user edit [ch10508] (#7877)

* Use correct Request include

* Updated to use additional form request

* Added SVG sanitizer

* Added response method to form request

* Allow ImageUploadRequest to accept fieldname params, added SVG sanitization, fixed delete

* Fixed upload path for avatars

* Added fieldname variable to blade partial for image upload

* Added enctype="multipart/form-data"  to form to allow uploads

* Added image field

* Updated Request::old() to use $request->old()

* Fixed derp in edit blade referring to $item when it should be $user

* Added svg+xml to image rule
This commit is contained in:
snipe
2020-03-05 18:00:24 -08:00
committed by GitHub
parent 9aed12c5aa
commit 039f5da0e1
6 changed files with 74 additions and 25 deletions

View File

@ -19,6 +19,12 @@ class SaveUserRequest extends FormRequest
return true;
}
public function response(array $errors)
{
return $this->redirector->back()->withInput()->withErrors($errors, $this->errorBag);
}
/**
* Get the validation rules that apply to the request.
*