Преглед на файлове

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

Renée Kooi преди 6 години
родител
ревизия
613fa8957b
променени са 2 файла, в които са добавени 3 реда и са изтрити 3 реда
  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,
       timeout: 30 * 1000,
       limit: 0,
       limit: 0,
       withCredentials: false,
       withCredentials: false,
-      responseType: 'text',
+      responseType: '',
       /**
       /**
        * @typedef respObj
        * @typedef respObj
        * @property {string} responseText
        * @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.
 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`
 ### `withCredentials: false`