Search code examples
swfupload

SWFUpload - How to Cancel Queued Files


I'm a little confused on how to cancel an upload in SWFUpload. I know you have to pass the cancelUpload() function the ID of the upload, but it seems like when I do this it doesn't work. A sample of my code would be:

function remove(number, id) {
    cancelUpload(id);
}

<span onClick = "remove(0, 'SWFUpload_0_0')">filename</span>

However, the file still uploads. Any ideas?


Solution

  • Have to add the variable you assign SWFUpload to. In this case, swfu.cancelUpload() worked.