]> BookStack Code Mirror - bookstack/blobdiff - app/Uploads/ImageRepo.php
System CLI: Updated to 126de5599c state
[bookstack] / app / Uploads / ImageRepo.php
index 160a02fa11c94f57aa315422e10a9698214552b1..845067fdc29987e318633a079c11f98ef3d6deef 100644 (file)
@@ -2,7 +2,6 @@
 
 namespace BookStack\Uploads;
 
-use BookStack\Entities\Models\Page;
 use BookStack\Entities\Queries\PageQueries;
 use BookStack\Exceptions\ImageUploadException;
 use BookStack\Permissions\PermissionApplicator;
@@ -167,7 +166,7 @@ class ImageRepo
      */
     public function updateImageFile(Image $image, UploadedFile $file): void
     {
-        if ($file->getClientOriginalExtension() !== pathinfo($image->path, PATHINFO_EXTENSION)) {
+        if (strtolower($file->getClientOriginalExtension()) !== strtolower(pathinfo($image->path, PATHINFO_EXTENSION))) {
             throw new ImageUploadException(trans('errors.image_upload_replace_type'));
         }