0
0
Fork 0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-04-21 03:30:38 +00:00

Removed bmp and tiff support from uploaded images.

Fixes 
This commit is contained in:
Dan Brown 2020-04-05 16:15:05 +01:00
parent feab756b9f
commit ea9e9565ef
No known key found for this signature in database
GPG key ID: 46D9F943C24A2EF9
2 changed files with 2 additions and 2 deletions
app
Http/Controllers
Providers

View file

@ -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';
}
}

View file

@ -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);
});