Refer to thread How to enable a cancel button when an upload takes place.