Add image/vnd.microsoft.icon because OSX uses that instead of image/x-icon

This commit is contained in:
Shish 2020-06-25 14:54:05 +01:00
parent 35626d3989
commit 3297e71636
3 changed files with 3 additions and 2 deletions

View file

@ -2,7 +2,7 @@
class IcoFileHandler extends DataHandlerExtension class IcoFileHandler extends DataHandlerExtension
{ {
protected $SUPPORTED_MIME = [MimeType::ICO, MimeType::ANI, MimeType::WIN_BITMAP]; protected $SUPPORTED_MIME = [MimeType::ICO, MimeType::ANI, MimeType::WIN_BITMAP, MimeType::ICO_OSX];
protected function media_check_properties(MediaCheckPropertiesEvent $event): void protected function media_check_properties(MediaCheckPropertiesEvent $event): void
{ {

View file

@ -87,7 +87,7 @@ class MimeMap
MimeType::ICO => [ MimeType::ICO => [
self::MAP_NAME => "Icon", self::MAP_NAME => "Icon",
self::MAP_EXT => [FileExtension::ICO, FileExtension::CUR], self::MAP_EXT => [FileExtension::ICO, FileExtension::CUR],
self::MAP_MIME => [MimeType::ICO, MimeType::WIN_BITMAP], self::MAP_MIME => [MimeType::ICO, MimeType::ICO_OSX, MimeType::WIN_BITMAP],
], ],
MimeType::JPEG => [ MimeType::JPEG => [
self::MAP_NAME => "JPEG", self::MAP_NAME => "JPEG",

View file

@ -22,6 +22,7 @@ class MimeType
public const GZIP = 'application/x-gzip'; public const GZIP = 'application/x-gzip';
public const HTML = 'text/html'; public const HTML = 'text/html';
public const ICO = 'image/x-icon'; public const ICO = 'image/x-icon';
public const ICO_OSX = 'image/vnd.microsoft.icon';
public const JPEG = 'image/jpeg'; public const JPEG = 'image/jpeg';
public const JS = 'text/javascript'; public const JS = 'text/javascript';
public const JSON = 'application/json'; public const JSON = 'application/json';