How do you cancel a single upload?

I see the cancelAll method in the documentation, but I’m not sure how to go about cancelling a specific upload. Seems like a common use-case, so I’m not sure what I’m missing. Any help is appreciated, thank you!

Nevermind, turns out removeFile was what I was after.

how did you implement that? docs seem to suggest that i set showRemoveButtonAfterComplete: true and do something like

.on('file-removed', (file, reason) => {
 if (reason === 'removed-by-user') {
  uppy.removeFile(file)
 }
})

but that doesn’t work at all.

i just want the file to be removed from the successful uploads field in the DOM, and it seems like that should work automatically? am i mistaken?