|
@@ -324,7 +324,7 @@ export default class XHRUpload<
|
|
|
timer.progress()
|
|
|
|
|
|
if (ev.lengthComputable) {
|
|
|
- this.uppy.emit('upload-progress', file, {
|
|
|
+ this.uppy.emit('upload-progress', this.uppy.getFile(file.id), {
|
|
|
// TODO: do not send `uploader` in next major
|
|
|
// @ts-expect-error we can't type this and we should remove it
|
|
|
uploader: this,
|
|
@@ -354,7 +354,11 @@ export default class XHRUpload<
|
|
|
uploadURL,
|
|
|
}
|
|
|
|
|
|
- this.uppy.emit('upload-success', file, uploadResp)
|
|
|
+ this.uppy.emit(
|
|
|
+ 'upload-success',
|
|
|
+ this.uppy.getFile(file.id),
|
|
|
+ uploadResp,
|
|
|
+ )
|
|
|
|
|
|
if (uploadURL) {
|
|
|
this.uppy.log(`Download ${file.name} from ${uploadURL}`)
|
|
@@ -475,7 +479,7 @@ export default class XHRUpload<
|
|
|
if (!ev.lengthComputable) return
|
|
|
|
|
|
files.forEach((file) => {
|
|
|
- this.uppy.emit('upload-progress', file, {
|
|
|
+ this.uppy.emit('upload-progress', this.uppy.getFile(file.id), {
|
|
|
// TODO: do not send `uploader` in next major
|
|
|
// @ts-expect-error we can't type this and we should remove it
|
|
|
uploader: this,
|
|
@@ -496,7 +500,11 @@ export default class XHRUpload<
|
|
|
body,
|
|
|
}
|
|
|
files.forEach((file) => {
|
|
|
- this.uppy.emit('upload-success', file, uploadResp)
|
|
|
+ this.uppy.emit(
|
|
|
+ 'upload-success',
|
|
|
+ this.uppy.getFile(file.id),
|
|
|
+ uploadResp,
|
|
|
+ )
|
|
|
})
|
|
|
return resolve()
|
|
|
}
|