How do I create a Blob in Node.js?
问题 I have tried to create a Blob in Node.js. First just this: var b = new Blob(['hi', 'constructing', 'a', 'blob']); This fails with ReferenceError: Blob is not defined Then I tried with the blob module (the two lines of code is from the example for this module, see https://www.npmjs.com/package/blob): var Blob = require('blob'); var b = new Blob(['hi', 'constructing', 'a', 'blob']); This fails with TypeError: Blob is not a constructor How can I do it? 回答1: Node.js doesn't have Blob , it uses