tonistiigi / mega

THIS REPO IS NOT MAINTAINED. Unofficial Node.js SDK for Mega
http://tonistiigi.github.com/mega
118 stars 33 forks source link

firefox error with browserify #20

Closed smolleyes closed 10 years ago

smolleyes commented 10 years ago

hi :)

there s a problem with the demo page and firefox

error

InvalidStateError: An attempt was made to use an object that is not, or is no longer, usable

coming from

self.xhr.responseType = 'arraybuffer'

the download works if i comment this line then i have

TypeError: buf.copy is not a function

when the download end

thanks :)

ps: no problems on chrome

smolleyes commented 10 years ago

demo page for browserify :p

no idears toni ?

thx

smolleyes commented 10 years ago

ok

we just have to put the line self.xhr.responseType = 'arraybuffer' after the xhr.open not before

thanks