diff --git a/common/js/plugins/jquery.fileupload/js/app.js b/common/js/plugins/jquery.fileupload/js/app.js index 47b4f923b..548a60d31 100755 --- a/common/js/plugins/jquery.fileupload/js/app.js +++ b/common/js/plugins/jquery.fileupload/js/app.js @@ -37,7 +37,7 @@ // send Blob objects via XHR requests: disableImageResize: /Android(?!.*Chrome)|Opera/ .test(window.navigator.userAgent), - maxFileSize: 5000000, + maxFileSize: 999000, acceptFileTypes: /(\.|\/)(gif|jpe?g|png)$/i }); } diff --git a/common/js/plugins/jquery.fileupload/js/jquery.fileupload-image.js b/common/js/plugins/jquery.fileupload/js/jquery.fileupload-image.js index 0ac993650..266b088de 100755 --- a/common/js/plugins/jquery.fileupload/js/jquery.fileupload-image.js +++ b/common/js/plugins/jquery.fileupload/js/jquery.fileupload-image.js @@ -242,7 +242,7 @@ blob.name = file.name; } else if (file.name) { blob.name = file.name.replace( - /\..+$/, + /\.\w+$/, '.' + blob.type.substr(6) ); } diff --git a/common/js/plugins/jquery.fileupload/js/jquery.fileupload.js b/common/js/plugins/jquery.fileupload/js/jquery.fileupload.js index e99f3091e..ab0748fc0 100755 --- a/common/js/plugins/jquery.fileupload/js/jquery.fileupload.js +++ b/common/js/plugins/jquery.fileupload/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 @@ -277,7 +277,8 @@ // The following are jQuery ajax settings required for the file uploads: processData: false, contentType: false, - cache: false + cache: false, + timeout: 0 }, // A list of options that require reinitializing event listeners and/or @@ -983,7 +984,10 @@ fileSet, i, j = 0; - if (limitSize && (!filesLength || files[0].size === undefined)) { + if (!filesLength) { + return false; + } + if (limitSize && files[0].size === undefined) { limitSize = undefined; } if (!(options.singleFileUploads || limit || limitSize) || @@ -1344,18 +1348,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); }