From 3297e716360f23708e1831fd5ced7229e7fa1332 Mon Sep 17 00:00:00 2001 From: Shish Date: Thu, 25 Jun 2020 14:54:05 +0100 Subject: [PATCH] Add image/vnd.microsoft.icon because OSX uses that instead of image/x-icon --- ext/handle_ico/main.php | 2 +- ext/mime/mime_map.php | 2 +- ext/mime/mime_type.php | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ext/handle_ico/main.php b/ext/handle_ico/main.php index 10d91ea1..69363c3a 100644 --- a/ext/handle_ico/main.php +++ b/ext/handle_ico/main.php @@ -2,7 +2,7 @@ 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 { diff --git a/ext/mime/mime_map.php b/ext/mime/mime_map.php index 80ba68a2..a434f782 100644 --- a/ext/mime/mime_map.php +++ b/ext/mime/mime_map.php @@ -87,7 +87,7 @@ class MimeMap MimeType::ICO => [ self::MAP_NAME => "Icon", 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 => [ self::MAP_NAME => "JPEG", diff --git a/ext/mime/mime_type.php b/ext/mime/mime_type.php index bf7d0ede..cd925c39 100644 --- a/ext/mime/mime_type.php +++ b/ext/mime/mime_type.php @@ -22,6 +22,7 @@ class MimeType public const GZIP = 'application/x-gzip'; public const HTML = 'text/html'; public const ICO = 'image/x-icon'; + public const ICO_OSX = 'image/vnd.microsoft.icon'; public const JPEG = 'image/jpeg'; public const JS = 'text/javascript'; public const JSON = 'application/json';