]> BookStack Code Mirror - bookstack/blobdiff - app/Http/Controllers/Images/ImageController.php
Fix timestamp in API docs example response
[bookstack] / app / Http / Controllers / Images / ImageController.php
index 21ed58553f84ee3a6003cf27edb859c43ff64897..cd6b2d4063f8287f1e451eecb1ff8c756028c61f 100644 (file)
@@ -14,12 +14,9 @@ use Illuminate\Validation\ValidationException;
 
 class ImageController extends Controller
 {
-    protected $imageRepo;
-    protected $imageService;
+    protected ImageRepo $imageRepo;
+    protected ImageService $imageService;
 
-    /**
-     * ImageController constructor.
-     */
     public function __construct(ImageRepo $imageRepo, ImageService $imageService)
     {
         $this->imageRepo = $imageRepo;
@@ -33,7 +30,7 @@ class ImageController extends Controller
      */
     public function showImage(string $path)
     {
-        if (!$this->imageService->pathExistsInLocalSecure($path)) {
+        if (!$this->imageService->pathAccessibleInLocalSecure($path)) {
             throw (new NotFoundException(trans('errors.image_not_found')))
                 ->setSubtitle(trans('errors.image_not_found_subtitle'))
                 ->setDetails(trans('errors.image_not_found_details'));