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

This commit is contained in:
Renée Kooi 2018-11-12 13:15:09 +01:00
parent 71d8064982
commit 613fa8957b
No known key found for this signature in database
GPG key ID: 8CDD5F0BC448F040
2 changed files with 3 additions and 3 deletions

View file

@ -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

View file

@ -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`