mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-04-21 03:30:38 +00:00
parent
feab756b9f
commit
ea9e9565ef
2 changed files with 2 additions and 2 deletions
app
|
@ -195,6 +195,6 @@ abstract class Controller extends BaseController
|
|||
*/
|
||||
protected function getImageValidationRules(): string
|
||||
{
|
||||
return 'image_extension|no_double_extension|mimes:jpeg,png,gif,bmp,webp,tiff';
|
||||
return 'image_extension|no_double_extension|mimes:jpeg,png,gif,webp';
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ class AppServiceProvider extends ServiceProvider
|
|||
|
||||
// Custom validation methods
|
||||
Validator::extend('image_extension', function ($attribute, $value, $parameters, $validator) {
|
||||
$validImageExtensions = ['png', 'jpg', 'jpeg', 'bmp', 'gif', 'tiff', 'webp'];
|
||||
$validImageExtensions = ['png', 'jpg', 'jpeg', 'gif', 'webp'];
|
||||
return in_array(strtolower($value->getClientOriginalExtension()), $validImageExtensions);
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue