mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-05-23 23:29:59 +08:00
Added drawing endpoint tests
Also refactored ImageTests away from BrowserKit Also added image upload type validation.
This commit is contained in:
@ -120,7 +120,10 @@ class ImageController extends Controller
|
||||
$this->validate($request, [
|
||||
'file' => 'is_image'
|
||||
]);
|
||||
// TODO - Restrict & validate types
|
||||
|
||||
if (!$this->imageRepo->isValidType($type)) {
|
||||
return $this->jsonError(trans('errors.image_upload_type_error'));
|
||||
}
|
||||
|
||||
$imageUpload = $request->file('file');
|
||||
|
||||
|
Reference in New Issue
Block a user