From 613fa8957bf3a981943a4ac2b6a4bb2f3cf1fc3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9e=20Kooi?= Date: Mon, 12 Nov 2018 13:15:09 +0100 Subject: [PATCH] xhr-upload: default responseType to browser default (empty string) --- packages/@uppy/xhr-upload/src/index.js | 2 +- website/src/docs/xhrupload.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/@uppy/xhr-upload/src/index.js b/packages/@uppy/xhr-upload/src/index.js index b8c2aa09a..0d9d05f40 100644 --- a/packages/@uppy/xhr-upload/src/index.js +++ b/packages/@uppy/xhr-upload/src/index.js @@ -47,7 +47,7 @@ module.exports = class XHRUpload extends Plugin { timeout: 30 * 1000, limit: 0, withCredentials: false, - responseType: 'text', + responseType: '', /** * @typedef respObj * @property {string} responseText diff --git a/website/src/docs/xhrupload.md b/website/src/docs/xhrupload.md index bf196b39d..b38271319 100644 --- a/website/src/docs/xhrupload.md +++ b/website/src/docs/xhrupload.md @@ -173,9 +173,9 @@ The default for the timeout is 30 seconds. Limit the amount of uploads going on at the same time. Setting this to `0` means there is no limit on concurrent uploads. -### `responseType: 'text'` +### `responseType: ''` -The response type expected from the server, determining how the `xhr.response` property should be filled. The `xhr.response` property can be accessed in a custom [`getResponseData()`](#getResponseData-responseText-response) callback. This option sets the [`XMLHttpRequest.responseType][XHR.responseType] property. Only 'text', 'arraybuffer', 'blob' and 'document' are widely supported by browsers, so it's recommended to use one of those. +The response type expected from the server, determining how the `xhr.response` property should be filled. The `xhr.response` property can be accessed in a custom [`getResponseData()`](#getResponseData-responseText-response) callback. This option sets the [`XMLHttpRequest.responseType][XHR.responseType] property. Only '', 'text', 'arraybuffer', 'blob' and 'document' are widely supported by browsers, so it's recommended to use one of those. The default is the empty string, which is equivalent to 'text' for the `xhr.response` property. ### `withCredentials: false`