FilesFor3PStorage interface
Note
This API is in Beta and provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Object used to represent a file
- Extends
-
Blob
Properties
| last |
A number that represents the number of milliseconds since the Unix epoch |
| name | Name of the file |
| type | file type |
| webkit |
A string containing the path of the file relative to the ancestor directory the user selected |
Inherited Properties
| size | The |
Inherited Methods
| array |
The |
| bytes() | The |
| slice(number, number, string) | The |
| stream() | The |
| text() | The |
Property Details
lastModified
A number that represents the number of milliseconds since the Unix epoch
lastModified: number
Property Value
number
name
Name of the file
name: string
Property Value
string
type
file type
type: string
Property Value
string
webkitRelativePath
A string containing the path of the file relative to the ancestor directory the user selected
webkitRelativePath?: string
Property Value
string
Inherited Property Details
size
The size read-only property of the Blob interface returns the size of the Blob or File in bytes.
size: number
Property Value
number
Inherited From Blob.size
Inherited Method Details
arrayBuffer()
The arrayBuffer() method of the Blob interface returns a Promise that resolves with the contents of the blob as binary data contained in an ArrayBuffer.
function arrayBuffer(): Promise<ArrayBuffer>
Returns
Promise<ArrayBuffer>
Inherited From Blob.arrayBuffer
bytes()
The bytes() method of the Blob interface returns a Promise that resolves with a Uint8Array containing the contents of the blob as an array of bytes.
function bytes(): Promise<Uint8Array<ArrayBuffer>>
Returns
Promise<Uint8Array<ArrayBuffer>>
Inherited From Blob.bytes
slice(number, number, string)
The slice() method of the Blob interface creates and returns a new Blob object which contains data from a subset of the blob on which it's called.
function slice(start?: number, end?: number, contentType?: string): Blob
Parameters
- start
-
number
- end
-
number
- contentType
-
string
Returns
Blob
Inherited From Blob.slice
stream()
The stream() method of the Blob interface returns a ReadableStream which upon reading returns the data contained within the Blob.
function stream(): ReadableStream<Uint8Array<ArrayBuffer>>
Returns
ReadableStream<Uint8Array<ArrayBuffer>>
Inherited From Blob.stream
text()
The text() method of the string containing the contents of the blob, interpreted as UTF-8.
function text(): Promise<string>
Returns
Promise<string>
Inherited From Blob.text