浏览代码

Update xhrupload.md

Kévin Berthommier 7 年之前
父节点
当前提交
0bcb2729c6
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      website/src/docs/xhrupload.md

+ 3 - 3
website/src/docs/xhrupload.md

@@ -72,7 +72,7 @@ uppy.setFileState(otherFileID, {
 })
 })
 ```
 ```
 
 
-### `getResponseData(xhr)`
+### `getResponseData(xhr.responseText, xhr)`
 
 
 When an upload has completed, Uppy will extract response data from the upload endpoint. This response data will be available on the file's `.response` property, and be emitted in the `upload-success` event:
 When an upload has completed, Uppy will extract response data from the upload endpoint. This response data will be available on the file's `.response` property, and be emitted in the `upload-success` event:
 
 
@@ -101,7 +101,7 @@ That object will be emitted in the `upload-success` event. Not all endpoints res
 For example, an endpoint that responds with an XML document:
 For example, an endpoint that responds with an XML document:
 
 
 ```js
 ```js
-getResponseData (xhr) {
+getResponseData (xhr.responseText, xhr) {
   return {
   return {
     url: xhr.responseXML.querySelector('Location').textContent
     url: xhr.responseXML.querySelector('Location').textContent
   }
   }
@@ -124,7 +124,7 @@ getResponseError (responseText, xhr) {
 
 
 ### `responseUrlFieldName: 'url'`
 ### `responseUrlFieldName: 'url'`
 
 
-The field name containing a publically accessible location of the uploaded file in the response data returned by `getResponseData(xhr)`.
+The field name containing a publically accessible location of the uploaded file in the response data returned by `getResponseData(xhr.responseText, xhr)`.
 
 
 ### `timeout: 30 * 1000`
 ### `timeout: 30 * 1000`