Node.js can't create Blobs?
The Solution to this problem is to create a function which can convert between Array Buffers and Node Buffers. :)
Convert a binary NodeJS Buffer to JavaScript ArrayBuffer
In recent node versions it's just:
let buffer = Buffer.from(arraybuffer);
let arraybuffer = Uint8Array.from(buffer).buffer;
Just use cross-blob
:
const Blob = require("cross-blob");
new Blob([]);
//=> Blob {size: 0, type: ""}
// Global patch (to support external modules like is-blob).
globalThis.Blob = Blob;