From 36c8d6ac5debe2b05d7cbc78087f34ab470022fc Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Wed, 29 Jul 2020 20:56:38 +0200 Subject: [PATCH] add default mime --- System/MimeType.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/System/MimeType.php b/System/MimeType.php index 9553c1723..8bb7a38d0 100644 --- a/System/MimeType.php +++ b/System/MimeType.php @@ -1019,4 +1019,14 @@ abstract class MimeType extends Enum public const M_ZIRZ = 'application/vnd.zul'; public const M_ZMM = 'application/vnd.handheld-entertainment+xml'; public const M_123 = 'application/vnd.lotus-1-2-3'; + + /** {@inheritdoc} */ + public static function getByName(string $name) + { + if (!self::isValidName($name)) { + return 'application/octet-stream'; + } + + return \constant('self::' . $name); + } }