From 97fa9663b1df1768ef8383e2e7acfcbb395ba029 Mon Sep 17 00:00:00 2001 From: Eli Young Date: Mon, 15 Mar 2021 16:42:11 -0700 Subject: [PATCH] Fixed #9299: Use correct SVG MIME type for uploads (#9300) The correct MIME type of SVG is image/svg+xml. Out of an abundance of caution, I am leaving in image/svg to avoid potentially causing issues on very old browsers, but this can likely be removed without issue. --- resources/views/partials/forms/edit/image-upload.blade.php | 2 +- resources/views/partials/forms/edit/uploadLogo.blade.php | 2 +- resources/views/settings/branding.blade.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/views/partials/forms/edit/image-upload.blade.php b/resources/views/partials/forms/edit/image-upload.blade.php index 78fe48ff8f..82078ff819 100644 --- a/resources/views/partials/forms/edit/image-upload.blade.php +++ b/resources/views/partials/forms/edit/image-upload.blade.php @@ -6,7 +6,7 @@ diff --git a/resources/views/partials/forms/edit/uploadLogo.blade.php b/resources/views/partials/forms/edit/uploadLogo.blade.php index 101e392809..b1d26a6742 100644 --- a/resources/views/partials/forms/edit/uploadLogo.blade.php +++ b/resources/views/partials/forms/edit/uploadLogo.blade.php @@ -35,7 +35,7 @@ {{ trans('button.select_file') }} + accept="{{ $allowedTypes ?? 'image/gif,image/jpeg,image/png,image/svg,image/svg+xml'}}" style="display:none; max-width: 90%"> diff --git a/resources/views/settings/branding.blade.php b/resources/views/settings/branding.blade.php index 9d0676c5ab..5081d25fc3 100644 --- a/resources/views/settings/branding.blade.php +++ b/resources/views/settings/branding.blade.php @@ -105,7 +105,7 @@ "logoLabel" => trans('admin/settings/general.favicon'), "logoClearVariable" => "clear_favicon", "helpBlock" => trans('admin/settings/general.favicon_size') .' '. trans('admin/settings/general.favicon_format'), - "allowedTypes" => "image/x-icon,image/gif,image/jpeg,image/png,image/svg,image/vnd.microsoft.icon", + "allowedTypes" => "image/x-icon,image/gif,image/jpeg,image/png,image/svg,image/svg+xml,image/vnd.microsoft.icon", "maxSize" => 20000 ])