|
|
@@ -1923,8 +1923,8 @@
|
|
|
}
|
|
|
|
|
|
var ext,
|
|
|
- extensions = options.extension ? options.extension.split(',') : null,
|
|
|
- types = options.type ? options.type.split(',') : null,
|
|
|
+ extensions = options.extension ? options.extension.toLowerCase().split(',') : null,
|
|
|
+ types = options.type ? options.type.toLowerCase().split(',') : null,
|
|
|
html5 = (window.File && window.FileList && window.FileReader);
|
|
|
|
|
|
if (html5) {
|
|
|
@@ -1939,19 +1939,19 @@
|
|
|
|
|
|
// Check file extension
|
|
|
ext = files[i].name.substr(files[i].name.lastIndexOf('.') + 1);
|
|
|
- if (extensions && extensions.indexOf(ext) == -1) {
|
|
|
+ if (extensions && $.inArray(ext.toLowerCase(), extensions) == -1) {
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
// Check file type
|
|
|
- if (types && types.indexOf(files[i].type) == -1) {
|
|
|
+ if (types && $.inArray(files[i].type.toLowerCase(), types) == -1) {
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
|
// Check file extension
|
|
|
ext = value.substr(value.lastIndexOf('.') + 1);
|
|
|
- if (extensions && extensions.indexOf(ext) == -1) {
|
|
|
+ if (extensions && $.inArray(ext.toLowerCase(), extensions) == -1) {
|
|
|
return false;
|
|
|
}
|
|
|
}
|