Skip to main content

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

ParameterTypeDescription
streamReadableThe Readable stream to read from.

Returns:

Promise<Buffer>

A Promise that resolves with a Buffer containing all the data from the Readable stream.