Home > vm-providers > bufferToDataURI
Takes a buffer and returns the corresponding data URI with base64 encoding.
Signature:
export declare function bufferToDataURI(buffer: Buffer, mediaType: string): string;
| Parameter | Type | Description |
|---|---|---|
| buffer | Buffer | buffer |
| mediaType | string | media type to include in the data URI, can be empty |
Returns:
string
data URI