Pergunta

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?

Foi útil?

Solução

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

Outras dicas

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);
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top