Appearance
Interface: SdkFile
Defined in: src/file/types.tsx:5
Represents a file in the SDK.
Deprecated
Use MwFile instead.
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
data | string | The file's data. | src/file/types.tsx:9 |
name | string | The name of the file. | src/file/types.tsx:14 |
webkitRelativePath | string | The webkitRelativePath of the file. | src/file/types.tsx:19 |
lastModified | number | The last modified timestamp of the file. | src/file/types.tsx:24 |
size | number | The size of the file in bytes. | src/file/types.tsx:29 |
type | string | The 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
| Parameter | Type | Description |
|---|---|---|
start? | number | The starting position of the slice (optional). |
end? | number | The ending position of the slice (optional). |
type? | string | The type of the slice (optional). |
Returns
SdkFile
A new SdkFile object that represents a portion of the original file.