Browse Source

xhr-upload: default responseType to browser default (empty string)

Renée Kooi 6 years ago
parent
commit
613fa8957b
2 changed files with 3 additions and 3 deletions
  1. 1 1
      packages/@uppy/xhr-upload/src/index.js
  2. 2 2
      website/src/docs/xhrupload.md

+ 1 - 1
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

+ 2 - 2
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`