Question

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?

Was it helpful?

Solution

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

OTHER TIPS

It is already in handlers.js file. This will cancel your current queued file.

ar progress = new FileProgress(file, this.customSettings.progressTarget);
progress.toggleCancel(true);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top