jQuery-File-Upload cancel uploading by javascript
问题 I am using jQuery-File-Upload https://github.com/blueimp/jQuery-File-Upload and i want to implement cancel uploading on click of cancel button manually, i know there is a callback "fileuploadfail" but can anyone give example how we use it. 回答1: Implement Cancel event using below code var jqXHR = $('#fileupload').fileupload('send', {files: filesList}) .error(function (jqXHR, textStatus, errorThrown) { if (errorThrown === 'abort') { alert('File Upload has been canceled'); } }); $('button.cancel