File class

File object that can be used to represent image or video or audio

Properties

content

Content of the file. When format is Base64, this is the base64 content When format is ID, this is id mapping to the URI When format is base64 and app needs to use this directly in HTML tags, it should convert this to dataUrl.

format

Format of the content

mimeType

MIME type. This can be used for constructing a dataUrl, if needed.

name

Optional: Name of the file

size

Size of the file in KB

Property Details

content

Content of the file. When format is Base64, this is the base64 content When format is ID, this is id mapping to the URI When format is base64 and app needs to use this directly in HTML tags, it should convert this to dataUrl.

content: string

Property Value

string

format

Format of the content

format: FileFormat

Property Value

mimeType

MIME type. This can be used for constructing a dataUrl, if needed.

mimeType: string

Property Value

string

name

Optional: Name of the file

name?: string

Property Value

string

size

Size of the file in KB

size: number

Property Value

number