weixiyen / jquery-filedrop

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

Can't get async sending to work #114

Open basarevych opened 11 years ago

basarevych commented 11 years ago

I see that there is xhr.open() call with the last parameter being true.

Strange, but when I try to upload it seems to be synchronous. Browser asks if I want to terminate a hanging script (200M file).

What am I doing wrong?

ilijamt commented 11 years ago

The problem is that Chrome doesn't have XMLHttpRequest.prototype.sendBinary. Firefox does and it works properly on that browser.

You can use this if you want that functionality: https://github.com/ilijamt/jquery-filedrop

Also all the newer browser support FormData so I've reworked it a little to use FormData if it's available if it's not it will fallback to the method used in this plugin