Skip to content
Snippets Groups Projects
Unverified Commit 97fa9663 authored by Eli Young's avatar Eli Young Committed by GitHub
Browse files

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.
parent c7626f83
Branches
Tags
No related merge requests found
......@@ -6,7 +6,7 @@
<label class="btn btn-default" aria-hidden="true">
{{ trans('button.select_file') }}
<input type="file" name="{{ (isset($fieldname) ? $fieldname : 'image') }}" class="js-uploadFile" id="uploadFile" data-maxsize="{{ \App\Helpers\Helper::file_upload_max_size() }}" accept="image/gif,image/jpeg,image/webp,image/png,image/svg" style="display:none; max-width: 90%" aria-label="image" aria-hidden="true">
<input type="file" name="{{ (isset($fieldname) ? $fieldname : 'image') }}" class="js-uploadFile" id="uploadFile" data-maxsize="{{ \App\Helpers\Helper::file_upload_max_size() }}" accept="image/gif,image/jpeg,image/webp,image/png,image/svg,image/svg+xml" style="display:none; max-width: 90%" aria-label="image" aria-hidden="true">
</label>
<span class='label label-default' id="uploadFile-info"></span>
......
......@@ -35,7 +35,7 @@
{{ trans('button.select_file') }}
<input type="file" name="{{ $logoVariable }}" class="js-uploadFile" id="{{ $logoId }}"
data-maxsize="{{ $maxSize ?? \App\Helpers\Helper::file_upload_max_size() }}"
accept="{{ $allowedTypes ?? 'image/gif,image/jpeg,image/png,image/svg'}}" style="display:none; max-width: 90%">
accept="{{ $allowedTypes ?? 'image/gif,image/jpeg,image/png,image/svg,image/svg+xml'}}" style="display:none; max-width: 90%">
</label>
<span class='label label-default' id="{{ $logoId }}-info"></span>
......
......@@ -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
])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment