]> BookStack Code Mirror - bookstack/blobdiff - app/Uploads/ImageRepo.php
Update settings.php
[bookstack] / app / Uploads / ImageRepo.php
index 01b65f882698933b54f66ba51dcee3f885aaf5cc..b7a21809f18ab7347e44945b8f0933815bf57b7e 100644 (file)
@@ -138,7 +138,7 @@ class ImageRepo
      */
     public function saveDrawing(string $base64Uri, int $uploadedTo): Image
     {
-        $name = 'Drawing-' . user()->getShortName(40) . '-' . strval(time()) . '.png';
+        $name = 'Drawing-' . strval(user()->id) . '-' . strval(time()) . '.png';
         return $this->imageService->saveNewFromBase64Uri($base64Uri, $name, 'drawio', $uploadedTo);
     }
 
@@ -219,12 +219,4 @@ class ImageRepo
             return null;
         }
     }
-
-    /**
-     * Get the validation rules for image files.
-     */
-    public function getImageValidationRules(): string
-    {
-        return 'image_extension|no_double_extension|mimes:jpeg,png,gif,bmp,webp,tiff';
-    }
 }