File uploads should be canceled as well

Move the block for doing file uploads into the block that checks whether they cancelled the form submission.