Creates a new FileData
object from the given data source.
Name | Type | Description |
---|---|---|
dataSource |
string | ArrayBuffer | ReadableStream | Blob | FileInfo |
The data source. |
Properties:
Name | Type | Description |
---|---|---|
size |
number | The data size in bytes. |
mimetype |
string | The MIME type of the data. |
Methods
-
Returns a promise that resolves to the data as ArrayBuffer.
Returns:
Type Description Promise.<ArrayBuffer> A promise that resolves to an ArrayBuffer. -
Returns a Blob with the data.
Returns:
Type Description Blob A Blob with the data. -
slice (from, to)core.Filesystem.FileData
-
Returns a sliced version of this
FileData
object.Name Type Description from
number The start position in bytes of the slice.
to
number The (non-inclusive) end position in bytes of the slice.
Returns:
Type Description core.Filesystem.FileData A new FileData
object. -
Returns a readable stream for reading from the data.
Returns:
Type Description ReadStream A readable stream. -
Returns a Promise that resolves to a string with the data.
Returns:
Type Description Promise.<string> A Promise that resolves to a string.