diff --git a/blueimp-file-upload.jquery.json b/blueimp-file-upload.jquery.json index 8119b8244..998ea9d75 100644 --- a/blueimp-file-upload.jquery.json +++ b/blueimp-file-upload.jquery.json @@ -1,6 +1,6 @@ { "name": "blueimp-file-upload", - "version": "9.9.2", + "version": "9.9.3", "title": "jQuery File Upload", "author": { "name": "Sebastian Tschan", diff --git a/bower.json b/bower.json index 1f17e0ec0..ad2e6c212 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "blueimp-file-upload", - "version": "9.9.2", + "version": "9.9.3", "title": "jQuery File Upload", "description": "File Upload widget with multiple file selection, drag&drop support, progress bar, validation and preview images, audio and video for jQuery. Supports cross-domain, chunked and resumable file uploads. Works with any server-side platform (Google App Engine, PHP, Python, Ruby on Rails, Java, etc.) that supports standard HTML form file uploads.", "keywords": [ diff --git a/js/jquery.fileupload.js b/js/jquery.fileupload.js index e99f3091e..9819d10ec 100644 --- a/js/jquery.fileupload.js +++ b/js/jquery.fileupload.js @@ -1,5 +1,5 @@ /* - * jQuery File Upload Plugin 5.42.2 + * jQuery File Upload Plugin 5.42.3 * https://github.com/blueimp/jQuery-File-Upload * * Copyright 2010, Sebastian Tschan @@ -1344,18 +1344,19 @@ _initDataAttributes: function () { var that = this, options = this.options, - clone = $(this.element[0].cloneNode(false)), - data = clone.data(); - // Avoid memory leaks: - clone.remove(); + data = this.element.data(); // Initialize options set via HTML5 data-attributes: $.each( - data, - function (key, value) { - var dataAttributeName = 'data-' + - // Convert camelCase to hyphen-ated key: - key.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase(); - if (clone.attr(dataAttributeName)) { + this.element[0].attributes, + function (index, attr) { + var key = attr.name.toLowerCase(), + value; + if (/^data-/.test(key)) { + // Convert hyphen-ated key to camelCase: + key = key.slice(5).replace(/-[a-z]/g, function (str) { + return str.charAt(1).toUpperCase(); + }); + value = data[key]; if (that._isRegExpOption(key, value)) { value = that._getRegExp(value); } diff --git a/package.json b/package.json index 436cf2575..5d2f65e3a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "blueimp-file-upload", - "version": "9.9.2", + "version": "9.9.3", "title": "jQuery File Upload", "description": "File Upload widget with multiple file selection, drag&drop support, progress bar, validation and preview images, audio and video for jQuery. Supports cross-domain, chunked and resumable file uploads. Works with any server-side platform (Google App Engine, PHP, Python, Ruby on Rails, Java, etc.) that supports standard HTML form file uploads.", "keywords": [