blueimp/jQuery-File-Upload

_cancelHandler error after failed upload

Kaias26 opened this issue · 2 comments

Steps to reproduce :

  • Upload a file
  • Make it fail due to server error (don't return json)
  • Try to Cancel the file from the list.

I did a few debug :
The Cancel button fire "_cancelHandler" event ( jquery.fileupload-ui.js line 654 )
The event check if data.abort, in my case it's undefined, so i fall into the Else
The else then call _trigger( "fail" ) and results in a jquery error.

I replaced "fail" by "destroy" and it worked, not sure if it's the right thing to do tho...

Thanks for your report. I have not been able to reproduce this yet, but I'll leave this issue open for now.

Sorry but I don't think this is an issue with the library.
You can test the behavior for issues with server responses on the demo, by entering the following in the browser console:

$('#fileupload').fileupload('option', 'url', 'https://jquery-file-upload.appspot.com/404/')

This results in failed uploads, but those can all be removed via the cancel button.