1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-31 15:24:31 +03:00

Started custom dropzone implementation

This commit is contained in:
Dan Brown
2023-04-24 16:19:20 +01:00
parent 55af22b487
commit 23915c3b1a
4 changed files with 133 additions and 65 deletions

View File

@ -42,9 +42,15 @@ class GalleryImageController extends Controller
public function create(Request $request)
{
$this->checkPermission('image-create-all');
$this->validate($request, [
'file' => $this->getImageValidationRules(),
]);
try {
$this->validate($request, [
'file' => $this->getImageValidationRules(),
]);
} catch (ValidationException $exception) {
// TODO - Check potential other upload locations?
return $this->jsonError(implode("\n", $exception->errors()['file']));
}
try {
$imageUpload = $request->file('file');