@uppy/xhr-upload
Advanced tools
Comparing version 3.0.0-beta to 3.0.0-beta.1
# @uppy/xhr-upload | ||
## 2.1.2 | ||
Released: 2022-06-07 | ||
Included in: Uppy v2.12.0 | ||
- @uppy/xhr-upload: replace `ev.target.status` with `xhr.status` (Wes Sankey / #3782) | ||
## 2.1.1 | ||
@@ -4,0 +11,0 @@ |
@@ -13,3 +13,3 @@ import BasePlugin from '@uppy/core/lib/BasePlugin'; | ||
const packageJson = { | ||
"version": "3.0.0-beta" | ||
"version": "3.0.0-beta.1" | ||
}; | ||
@@ -246,3 +246,3 @@ import locale from './locale.js'; | ||
}); | ||
xhr.addEventListener('load', ev => { | ||
xhr.addEventListener('load', () => { | ||
this.uppy.log(`[XHRUpload] ${id} finished`); | ||
@@ -257,7 +257,7 @@ timer.done(); | ||
if (opts.validateStatus(ev.target.status, xhr.responseText, xhr)) { | ||
if (opts.validateStatus(xhr.status, xhr.responseText, xhr)) { | ||
const body = opts.getResponseData(xhr.responseText, xhr); | ||
const uploadURL = body[opts.responseUrlFieldName]; | ||
const uploadResp = { | ||
status: ev.target.status, | ||
status: xhr.status, | ||
body, | ||
@@ -278,3 +278,3 @@ uploadURL | ||
const response = { | ||
status: ev.target.status, | ||
status: xhr.status, | ||
body | ||
@@ -281,0 +281,0 @@ }; |
{ | ||
"name": "@uppy/xhr-upload", | ||
"description": "Plain and simple classic HTML multipart form uploads with Uppy, as well as uploads using the HTTP PUT method.", | ||
"version": "3.0.0-beta", | ||
"version": "3.0.0-beta.1", | ||
"license": "MIT", | ||
@@ -28,3 +28,3 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"@uppy/companion-client": "^3.0.0-beta", | ||
"@uppy/companion-client": "^3.0.0-beta.1", | ||
"@uppy/utils": "^5.0.0-beta", | ||
@@ -38,5 +38,5 @@ "nanoid": "^3.1.25" | ||
"peerDependencies": { | ||
"@uppy/core": "^3.0.0-beta" | ||
"@uppy/core": "^3.0.0-beta.1" | ||
}, | ||
"stableVersion": "2.1.1" | ||
} |
@@ -254,3 +254,3 @@ import BasePlugin from '@uppy/core/lib/BasePlugin' | ||
xhr.addEventListener('load', (ev) => { | ||
xhr.addEventListener('load', () => { | ||
this.uppy.log(`[XHRUpload] ${id} finished`) | ||
@@ -264,3 +264,3 @@ timer.done() | ||
if (opts.validateStatus(ev.target.status, xhr.responseText, xhr)) { | ||
if (opts.validateStatus(xhr.status, xhr.responseText, xhr)) { | ||
const body = opts.getResponseData(xhr.responseText, xhr) | ||
@@ -270,3 +270,3 @@ const uploadURL = body[opts.responseUrlFieldName] | ||
const uploadResp = { | ||
status: ev.target.status, | ||
status: xhr.status, | ||
body, | ||
@@ -288,3 +288,3 @@ uploadURL, | ||
const response = { | ||
status: ev.target.status, | ||
status: xhr.status, | ||
body, | ||
@@ -291,0 +291,0 @@ } |
Sorry, the diff of this file is not supported yet
93780