We want to support the real stream at some point and don't have to care whether or not it's a node stream or a blob stream
|
// Body is blob |
|
if (isBlob(body)) { |
|
body = body.stream(); |
|
} |
I think we need change that to this:
// Body is blob
if (isBlob(body)) {
- body = body.stream();
+ body = stream.Readable.from(body.stream());
}
I where namely thinking of if we should scale down fetch-blob's Blob.prototype.stream function into returning a partial piece of the whatwg stream (which is the async iterator that yields uint8arrays)
We want to support the real stream at some point and don't have to care whether or not it's a node stream or a blob stream
node-fetch/src/body.js
Lines 178 to 181 in 6ee9d31
I think we need change that to this:
// Body is blob if (isBlob(body)) { - body = body.stream(); + body = stream.Readable.from(body.stream()); }I where namely thinking of if we should scale down fetch-blob's Blob.prototype.stream function into returning a partial piece of the whatwg stream (which is the async iterator that yields uint8arrays)