Unfortunately, sometimes the browser or someone else's API gives you a
browser. How do you convert it to a
Something with a goofy
FileReader thingy... Time to Google for it yet again... There must be a better way!
There is! Simply use this module!
Works in the browser. This module is used by WebTorrent!
npm install blob-to-buffer
var toBuffer =// Get a Blob somehow...var blob = 1 2 3 type: 'application/octet-binary'var buffer =
MIT. Copyright (c) Feross Aboukhadijeh.