4 Replies Latest reply on Apr 17, 2009 2:53 AM by Madhav Subedi

    How to properly cancel file upload?

    kmdguy Level 1
      Hi there,

      I have a routine that uploads files to my server. It works great, no problems. I'm trying to implement a CANCEL button in case the user wants to cancel the upload.

      I created a cancelUpload function (see below) based on some examples I've seen.

      But when I implement that function with a button I keep getting an error "Incorrect number of arguments. Expected 1."

      <mx:Button label="Cancel" click="cancelUpload()"/>

      I try putting in an argument such as "cancelUpload(f)" but I get an error "Access of undefined property f."

      Any idea what I'm missing on this? Below is a snippet of my code: