From 978ad528091b8c7ef412af6da68b6ec598bbd286 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Lipski?= Date: Tue, 13 Nov 2012 02:35:41 +0100 Subject: [PATCH 1/3] Update JavaScript assets. --- .../jquery-fileupload/jquery.fileupload-fp.js | 5 ++++- .../jquery-fileupload/jquery.fileupload.js | 18 +++++++++--------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/vendor/assets/javascripts/jquery-fileupload/jquery.fileupload-fp.js b/vendor/assets/javascripts/jquery-fileupload/jquery.fileupload-fp.js index 2102b8b..fdf18fb 100644 --- a/vendor/assets/javascripts/jquery-fileupload/jquery.fileupload-fp.js +++ b/vendor/assets/javascripts/jquery-fileupload/jquery.fileupload-fp.js @@ -1,5 +1,5 @@ /* - * jQuery File Upload File Processing Plugin 1.2 + * jQuery File Upload File Processing Plugin 1.2.1 * https://github.com/blueimp/jQuery-File-Upload * * Copyright 2012, Sebastian Tschan @@ -86,6 +86,9 @@ loadImage( file, function (img) { + if (!img.src) { + return dfd.rejectWith(that, [data]); + } data.img = img; dfd.resolveWith(that, [data]); } diff --git a/vendor/assets/javascripts/jquery-fileupload/jquery.fileupload.js b/vendor/assets/javascripts/jquery-fileupload/jquery.fileupload.js index 5504ebe..6356012 100644 --- a/vendor/assets/javascripts/jquery-fileupload/jquery.fileupload.js +++ b/vendor/assets/javascripts/jquery-fileupload/jquery.fileupload.js @@ -1,5 +1,5 @@ /* - * jQuery File Upload Plugin 5.19.2 + * jQuery File Upload Plugin 5.19.3 * https://github.com/blueimp/jQuery-File-Upload * * Copyright 2010, Sebastian Tschan @@ -644,18 +644,18 @@ _onSend: function (e, data) { var that = this, jqXHR, + aborted, slot, pipe, options = that._getAJAXSettings(data), - send = function (resolve, args) { + send = function () { that._sending += 1; // Set timer for bitrate progress calculation: options._bitrateTimer = new that._BitrateTimer(); jqXHR = jqXHR || ( - (resolve !== false && - that._trigger('send', e, options) !== false && - (that._chunkedUpload(options) || $.ajax(options))) || - that._getXHRPromise(false, options.context, args) + ((aborted || that._trigger('send', e, options) === false) && + that._getXHRPromise(false, options.context, aborted)) || + that._chunkedUpload(options) || $.ajax(options) ).done(function (result, textStatus, jqXHR) { that._onDone(result, textStatus, jqXHR, options); }).fail(function (jqXHR, textStatus, errorThrown) { @@ -705,12 +705,12 @@ // which is delegated to the jqXHR object of the current upload, // and jqXHR callbacks mapped to the equivalent Promise methods: pipe.abort = function () { - var args = [undefined, 'abort', 'abort']; + aborted = [undefined, 'abort', 'abort']; if (!jqXHR) { if (slot) { - slot.rejectWith(pipe, args); + slot.rejectWith(options.context, aborted); } - return send(false, args); + return send(); } return jqXHR.abort(); }; From db28426656223c13873d2bcd006581c53c93cb1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Lipski?= Date: Tue, 13 Nov 2012 02:36:17 +0100 Subject: [PATCH 2/3] Update readme. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 232f3e0..936b58b 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ jquery-fileupload-rails is a library that integrates jQuery File Upload for Rail ## Plugin versions * jQuery File Upload User Interface Plugin 6.11 -* jQuery File Upload Plugin 5.19.2 +* jQuery File Upload Plugin 5.19.3 * jQuery UI Widget 1.9.1+amd ## Installing Gem From aa6b1f994542c177ba8cf2ddddbb8718645da2ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Lipski?= Date: Tue, 13 Nov 2012 02:36:34 +0100 Subject: [PATCH 3/3] Bump version. --- lib/jquery/fileupload/rails/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/jquery/fileupload/rails/version.rb b/lib/jquery/fileupload/rails/version.rb index 517de9f..e037147 100644 --- a/lib/jquery/fileupload/rails/version.rb +++ b/lib/jquery/fileupload/rails/version.rb @@ -1,7 +1,7 @@ module JQuery module FileUpload module Rails - VERSION = "0.3.5" + VERSION = "0.3.6" end end end