From: Matthias Schmidt Date: Wed, 23 Sep 2015 16:10:29 +0000 (+0200) Subject: Fix handling of FormData in AjaxRequest X-Git-Tag: 3.0.0_Beta_1~2121 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f8270d7c97a8dae8244828e2d5d104023310e3fe;p=GitHub%2FWoltLab%2FWCF.git Fix handling of FormData in AjaxRequest --- diff --git a/wcfsetup/install/files/js/WoltLab/WCF/Ajax/Request.js b/wcfsetup/install/files/js/WoltLab/WCF/Ajax/Request.js index 917c5d6986..aa8efafe03 100644 --- a/wcfsetup/install/files/js/WoltLab/WCF/Ajax/Request.js +++ b/wcfsetup/install/files/js/WoltLab/WCF/Ajax/Request.js @@ -137,7 +137,7 @@ define(['Core', 'Language', 'Dom/ChangeListener', 'Dom/Util', 'Ui/Dialog', 'Wolt if (this._options.type === 'POST') { var data = this._options.data; - if (typeof data === 'object') { + if (typeof data === 'object' && Core.getType(data) !== 'FormData') { data = Core.serialize(data); } @@ -194,7 +194,7 @@ define(['Core', 'Language', 'Dom/ChangeListener', 'Dom/Util', 'Ui/Dialog', 'Wolt * @param {object} data request data */ setData: function(data) { - if (this._data !== null) { + if (this._data !== null && Core.getType(data) !== 'FormData') { data = Core.extend(this._data, data); }