Closed wallymathieu closed 11 years ago
I also had to move the xhr.withCredentials
line to just after the xhr.open
call to fix an InvalidStateError message, but otherwise this seems to work well.
How do you reproduce the InvalidStateError message?
Hmm, I'm not sure. It just kept coming up whenever I tried dropping a file, so I googled around and it seemed others found that waiting to set xhr.withCredentials
til after the xhr.open
was called fixed it. I tried that and it worked. I'm using IE10 through VMWare Fusion from the modern.IE downloads.
Updated the feature detection based on above.
Turns out the FileReader.readAsBinaryString
method isn't even really in the spec. Strange that MDN doesn't mention this at all, but it somewhat explains why IE10 doesn't support it.
I've added a patch to this series to clean things up a bit and move all browsers to using the standard FileReader.readAsDataURL
and atob
function, and it now seems to work in FF, Chrome, IE10, and Opera (not Safari at the moment).
A bit of a hack, but looks like it's working.