From ec96ae6019c3b1587ddc1d69987efc351fa20391 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Mon, 28 Sep 2015 17:15:28 +0200 Subject: [PATCH] Use second argument of bind in Upload.js --- wcfsetup/install/files/js/WoltLab/WCF/Upload.js | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/wcfsetup/install/files/js/WoltLab/WCF/Upload.js b/wcfsetup/install/files/js/WoltLab/WCF/Upload.js index d6123dd0c3..07f0ba0fe4 100644 --- a/wcfsetup/install/files/js/WoltLab/WCF/Upload.js +++ b/wcfsetup/install/files/js/WoltLab/WCF/Upload.js @@ -306,15 +306,9 @@ define(['AjaxRequest', 'Core', 'Dom/ChangeListener', 'Language', 'Dom/Util'], fu var request = new AjaxRequest({ data: formData, contentType: false, - failure: function(data, responseText, xhr, requestOptions) { - this._failure(uploadId, data, responseText, xhr, options.data); - }.bind(this), - success: function(data, responseText, xhr, requestOptions) { - this._success(uploadId, data, responseText, xhr, requestOptions); - }.bind(this), - uploadProgress: (function(event) { - this._progress(uploadId, event); - }).bind(this), + failure: this._failure.bind(this, uploadId), + success: this._success.bind(this, uploadId), + uploadProgress: this._progress.bind(this, uploadId), url: this._options.url }); request.sendRequest(); -- 2.20.1