diff --git a/js/bootstrap-fileupload.js b/js/bootstrap-fileupload.js index 64f66f6b..97a6da5b 100644 --- a/js/bootstrap-fileupload.js +++ b/js/bootstrap-fileupload.js @@ -78,7 +78,7 @@ this.$hidden.attr('name', '') this.$input.attr('name', this.name) - if (this.type === "image" && this.$preview.length > 0 && (typeof file.type !== "undefined" ? file.type.match('image.*') : file.name.match('\\.(gif|png|jpe?g)$')) && typeof FileReader !== "undefined") { + if (this.type === "image" && this.$preview.length > 0 && (typeof file.type !== "undefined" ? file.type.match('image.*') : file.name.match(/\.(gif|png|jpe?g)$/i)) && typeof FileReader !== "undefined") { var reader = new FileReader() var preview = this.$preview var element = this.$element