weixiyen / jquery-filedrop

jQuery plugin - drag and drop desktop files and POST to a URL to handle files.
958 stars 285 forks source link

script error after successful upload #144

Closed alancolyer closed 11 years ago

alancolyer commented 11 years ago

Once I perform a successful upload with this script, execution stops seemingly halfway through the uploadFinished handler and I get the following script error in firebug: TypeError: elem.dispatchEvent is not a function

The line number it gives is line 54 in my page, which is bogus as it's now just a comment, it's in HTML too and not in a script file.

I'm using jQuery 2.0.3 and Firefox 24 on Mac OSX. I wondered if anyone else had this problem? Using the migrate script doesn't fix it either so probably not a compatibility issue with the new jQuery (but still not ruled out completely).

Anyone have any ideas?

alancolyer commented 11 years ago

After alot of testing I've managed to trace the error back to a situation where the upload works but my upload handler doesn't return anything, so the server response is null.

I'm not sure why the line number of the error or the error itself was bogus but fixing my upload script cured this error.