Skip to content

Commit 978ad52

Browse files
committed
Update JavaScript assets.
1 parent 9eb4e60 commit 978ad52

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

vendor/assets/javascripts/jquery-fileupload/jquery.fileupload-fp.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* jQuery File Upload File Processing Plugin 1.2
2+
* jQuery File Upload File Processing Plugin 1.2.1
33
* https://github.com/blueimp/jQuery-File-Upload
44
*
55
* Copyright 2012, Sebastian Tschan
@@ -86,6 +86,9 @@
8686
loadImage(
8787
file,
8888
function (img) {
89+
if (!img.src) {
90+
return dfd.rejectWith(that, [data]);
91+
}
8992
data.img = img;
9093
dfd.resolveWith(that, [data]);
9194
}

vendor/assets/javascripts/jquery-fileupload/jquery.fileupload.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* jQuery File Upload Plugin 5.19.2
2+
* jQuery File Upload Plugin 5.19.3
33
* https://github.com/blueimp/jQuery-File-Upload
44
*
55
* Copyright 2010, Sebastian Tschan
@@ -644,18 +644,18 @@
644644
_onSend: function (e, data) {
645645
var that = this,
646646
jqXHR,
647+
aborted,
647648
slot,
648649
pipe,
649650
options = that._getAJAXSettings(data),
650-
send = function (resolve, args) {
651+
send = function () {
651652
that._sending += 1;
652653
// Set timer for bitrate progress calculation:
653654
options._bitrateTimer = new that._BitrateTimer();
654655
jqXHR = jqXHR || (
655-
(resolve !== false &&
656-
that._trigger('send', e, options) !== false &&
657-
(that._chunkedUpload(options) || $.ajax(options))) ||
658-
that._getXHRPromise(false, options.context, args)
656+
((aborted || that._trigger('send', e, options) === false) &&
657+
that._getXHRPromise(false, options.context, aborted)) ||
658+
that._chunkedUpload(options) || $.ajax(options)
659659
).done(function (result, textStatus, jqXHR) {
660660
that._onDone(result, textStatus, jqXHR, options);
661661
}).fail(function (jqXHR, textStatus, errorThrown) {
@@ -705,12 +705,12 @@
705705
// which is delegated to the jqXHR object of the current upload,
706706
// and jqXHR callbacks mapped to the equivalent Promise methods:
707707
pipe.abort = function () {
708-
var args = [undefined, 'abort', 'abort'];
708+
aborted = [undefined, 'abort', 'abort'];
709709
if (!jqXHR) {
710710
if (slot) {
711-
slot.rejectWith(pipe, args);
711+
slot.rejectWith(options.context, aborted);
712712
}
713-
return send(false, args);
713+
return send();
714714
}
715715
return jqXHR.abort();
716716
};

0 commit comments

Comments
 (0)