Include SVG format

This commit is contained in:
Diego Najar 2019-05-29 16:21:25 +02:00
parent 6ae0f06ca9
commit 2c773ac1a4

View File

@ -176,7 +176,7 @@ function uploadImages() {
var images = $("#jsimages")[0].files;
for (var i=0; i < images.length; i++) {
// Check file type/extension
const validImageTypes = ['image/gif', 'image/jpeg', 'image/png'];
const validImageTypes = ['image/gif', 'image/jpeg', 'image/png', 'image/svg+xml'];
if (!validImageTypes.includes(images[i].type)) {
showMediaAlert("<?php echo $L->g('File type is not supported. Allowed types:').' '.implode(', ',ALLOWED_IMG_EXTENSION) ?>");
return false;