<?php namespace BookStack\Http\Controllers;
-use BookStack\Entities\EntityRepo;
+use BookStack\Entities\Repos\EntityRepo;
use BookStack\Exceptions\ImageUploadException;
use BookStack\Repos\PageRepo;
use BookStack\Uploads\Image;
{
$this->checkPermission('image-create-all');
$this->validate($request, [
- 'file' => 'is_image'
+ 'file' => 'image_extension|mimes:jpeg,png,gif,bmp,webp,tiff'
]);
if (!$this->imageRepo->isValidType($type)) {
return response($e->getMessage(), 500);
}
-
return response()->json($image);
}
/**
* Show the usage of an image on pages.
- * @param EntityRepo $entityRepo
+ * @param \BookStack\Entities\Repos\EntityRepo $entityRepo
* @param $id
* @return \Illuminate\Http\JsonResponse
*/