mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-20 18:18:56 +00:00
fix(view) images with upper case extension are not recognized as images
This commit is contained in:
parent
3b546f92ac
commit
86273c129e
1 changed files with 3 additions and 3 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue