mirror of
https://github.com/jasny/bootstrap.git
synced 2026-01-20 20:08:03 -05:00
Merge pull request #91 from vinc3m1/2.3.0-j5-wip
match case insensitive file extensions for photos
This commit is contained in:
2
js/bootstrap-fileupload.js
vendored
2
js/bootstrap-fileupload.js
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user