Skip to content

Interface: SdkFile

Defined in: src/file/types.tsx:5

Represents a file in the SDK.

Deprecated

Use MwFile instead.

Properties

PropertyTypeDescriptionDefined in
datastringThe file's data.src/file/types.tsx:9
namestringThe name of the file.src/file/types.tsx:14
webkitRelativePathstringThe webkitRelativePath of the file.src/file/types.tsx:19
lastModifiednumberThe last modified timestamp of the file.src/file/types.tsx:24
sizenumberThe size of the file in bytes.src/file/types.tsx:29
typestringThe type of the file.src/file/types.tsx:34

Methods

arrayBuffer()

ts
arrayBuffer(): Promise<ArrayBuffer>;

Defined in: src/file/types.tsx:40

Returns a promise that resolves to the file's data as an ArrayBuffer.

Returns

Promise<ArrayBuffer>

A promise that resolves to the file's data as an ArrayBuffer.


text()

ts
text(): Promise<string>;

Defined in: src/file/types.tsx:46

Returns a promise that resolves to the file's data as a string.

Returns

Promise<string>

A promise that resolves to the file's data as a string.


slice()

ts
slice(
   start?: number, 
   end?: number, 
   type?: string): SdkFile;

Defined in: src/file/types.tsx:55

Returns a new SdkFile object that represents a portion of the original file.

Parameters

ParameterTypeDescription
start?numberThe starting position of the slice (optional).
end?numberThe ending position of the slice (optional).
type?stringThe type of the slice (optional).

Returns

SdkFile

A new SdkFile object that represents a portion of the original file.

Matterway Assistant SDK Documentation