From f8270d7c97a8dae8244828e2d5d104023310e3fe Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Wed, 23 Sep 2015 18:10:29 +0200 Subject: [PATCH] Fix handling of FormData in AjaxRequest --- wcfsetup/install/files/js/WoltLab/WCF/Ajax/Request.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); } -- 2.20.1