Class “File”

Object > Blob > File

Represents raw data of a given type and name.

Type: File extends Blob
Constructor: public
Singleton: No
Namespace: global
Direct subclasses: None
JSX Support: No

Constructor

new File(blobParts, name, options?)

Parameter|Type|Description

  • |-|- blobParts | any[] | Array of ArrayBuffer, Blob, string, or any typed array. Any other type will be stringified. Strings are encoded as UTF-8. name | string | The name or path of the file options | {
      type: string, // optional
      lastModified: number // optional
    }
    | type represents the MIME type of the blob content. Defaults to empty string. lastModified is a unix timestamp of the last known modification of the file. Defaults to the current time. Optional.

Properties

lastModified

Unix timestamp of the last known modification of the file

Type: number
Settable: No

This property can only be set via constructor. Once set, it cannot change anymore.

name

The name or path of the file

Type: string
Settable: No

This property can only be set via constructor. Once set, it cannot change anymore.