fix(view) images with upper case extension are not recognized as images

This commit is contained in:
coderaiser 2015-04-13 07:02:32 -04:00
parent 3b546f92ac
commit 86273c129e

View file

@ -189,7 +189,7 @@ var CloudCmd, Util, DOM, CloudFunc, $;
'svg',
'ico'
].some(function(ext) {
var reg = RegExp('\\.' + ext + '$');
var reg = RegExp('\\.' + ext + '$', 'i');
return reg.test(name);
});
@ -205,11 +205,11 @@ var CloudCmd, Util, DOM, CloudFunc, $;
}
function isAudio(name) {
return /\.(mp3|ogg|m4a)$/.test(name);
return /\.(mp3|ogg|m4a)$/i.test(name);
}
function isVideo(name) {
return /\.(mp4|avi)$/.test(name);
return /\.(mp4|avi)$/i.test(name);
}
function getType(name) {