mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-08-28 13:12:05 +00:00
parent
feab756b9f
commit
ea9e9565ef
@ -195,6 +195,6 @@ abstract class Controller extends BaseController
|
|||||||
*/
|
*/
|
||||||
protected function getImageValidationRules(): string
|
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
|
// Custom validation methods
|
||||||
Validator::extend('image_extension', function ($attribute, $value, $parameters, $validator) {
|
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);
|
return in_array(strtolower($value->getClientOriginalExtension()), $validImageExtensions);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user