Assistive-Webdriver

Home > vm-providers > bufferToDataURI

bufferToDataURI() function

Takes a buffer and returns the corresponding data URI with base64 encoding.

Signature:

export declare function bufferToDataURI(buffer: Buffer, mediaType: string): string;

Parameters

Parameter Type Description
buffer Buffer buffer
mediaType string media type to include in the data URI, can be empty

Returns:

string

data URI