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?

Était-ce utile?

La solution

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

Autres conseils

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);
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top