X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/dabe79a438f22612e7d68c8d1de7817505b59b93..refs/pull/2023/head:/app/Uploads/ImageRepo.php diff --git a/app/Uploads/ImageRepo.php b/app/Uploads/ImageRepo.php index 01b65f882..b7a21809f 100644 --- a/app/Uploads/ImageRepo.php +++ b/app/Uploads/ImageRepo.php @@ -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'; - } }