Skip to content

Commit

Permalink
fix wrong events being sent to companion
Browse files Browse the repository at this point in the history
fixes #3572
  • Loading branch information
mifi committed Mar 16, 2022
1 parent fc6f8f3 commit 2cab8ee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/@uppy/aws-s3/src/MiniXHRUpload.js
Original file line number Diff line number Diff line change
Expand Up @@ -280,13 +280,13 @@ module.exports = class MiniXHRUpload {
})

this.#addEventHandlerForFile('file-removed', file.id, () => {
socket.send('pause', {})
socket.send('cancel', {})
queuedRequest.abort()
resolve(`upload ${file.id} was removed`)
})

this.#addEventHandlerIfFileStillExists('cancel-all', file.id, () => {
socket.send('pause', {})
socket.send('cancel', {})
queuedRequest.abort()
resolve(`upload ${file.id} was canceled`)
})
Expand Down

0 comments on commit 2cab8ee

Please sign in to comment.