sdk.file_2.sdkfile
Home > @matterway/sdk > File_2 > SdkFile
File_2.SdkFile class
Represents a file that has been loaded into memory from a base64-encoded data string.
Signature:
export declare class SdkFile
Constructors
Constructor | Modifiers | Description |
---|---|---|
(constructor)(data, name, type) | Constructs a new instance of the SdkFile class |
Properties
Property | Modifiers | Type | Description |
---|---|---|---|
data | string | The base64-encoded data for the file. | |
lastModified | number | Last modified time, in ms from epoch. | |
name | string | Name of the file. | |
size | number | Size in bytes. | |
type | string | MIME type. | |
webkitRelativePath | string | Relative path to the file. |
Methods
Method | Modifiers | Description |
---|---|---|
arrayBuffer() | Reads the data stream to completion, and returns it as ArrayBuffer. | |
slice(start, end, type) | Returns a new File with only data in the given range of bytes. | |
text() | Reads the data stream to completion, and returns it as string. |