Fix broken cancel button on first dialog

If you press "cancel" at the first dialog, it will continue to ask you if you want to upload, which can give the mistaken impression that it ignored your cancellation. By moving the ask_upload calls into the case block, this is fixed.