core.streamtobuffer
Home > @medplum/core > streamToBuffer
streamToBuffer() function
Reads data from a Readable stream and returns a Promise that resolves with a Buffer containing all the data.
Signature:
export declare function streamToBuffer(stream: Readable): Promise<Buffer>;
Parameters
Parameter | Type | Description |
---|---|---|
stream | Readable | The Readable stream to read from. |
Returns:
Promise<Buffer>
A Promise that resolves with a Buffer containing all the data from the Readable stream.