Blob constructor not working in safari / opera?

后端 未结 1 1300
梦毁少年i
梦毁少年i 2020-12-19 15:40

I\'m trying to construct a Blob from an array buffer that original comes from a binary string. It works fine in Firefox & Chrome, but I don\'t know whats wrong with Safa

相关标签:
1条回答
  • 2020-12-19 16:10

    In Safari you need to use the 'buffer' property on the TypedArray, i.e. this:

    blob = new Blob([intArray.buffer], {type: "image/png"});
    

    and it'll work.

    0 讨论(0)
提交回复
热议问题