How do I add the "cancel" button to a managed file I made a new component for webform that adds a file upload component. It has a "choose file" button, and an "upload" button. You can also choose to use a progress bar during the upload.  

Now I want to include a "cancel" button to interrupt the upload process. How can I do this?
if you redirect your browser I'm 99.9% sure it will cancel the upload.

how you handle that redirection is up to you.  I'd probably just show a hidden div when the upload starts with a Cancel upload

hopefully what I wrote above helps, but I'd like to mention the other alternative: 

don't put a cancel button in.  I would say that this is a useless "feature" and really why add things to your UI when you don't have to?

the user has to step through quite a few things, it'd be pretty odd if they selected the wrong file.