Skip to main content

sdk.file_2.convertbase64tofile

Home > @matterway/sdk > File_2 > convertBase64ToFile

File_2.convertBase64ToFile() function

Creates a File object from base64-encoded data.

Signature:

export declare function convertBase64ToFile(data: string, name: string, type: string): SdkFile;

Parameters

ParameterTypeDescription
datastringThe base64-encoded data for the file.
namestringThe name of the file.
typestringThe MIME type of the file.

Returns:

SdkFile

A File object that contains the file data and metadata.