From 5db41d5af05b4e04af6d9a3a688d693c068b5ce9 Mon Sep 17 00:00:00 2001 From: Vince Mi Date: Sun, 10 Mar 2013 03:13:29 -0700 Subject: [PATCH] match case insensitive file extensions for photos --- js/bootstrap-fileupload.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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