Class “File”

Object > Blob > File

Represents raw data of a given type and name.

Constructor public
Singleton No
Namespace global
Direct subclasses None
JSX support No

Constructor

new File(blobParts, name, options?)

Parameter|Type|Optional|Description

  • |-|-|- blobParts | any[] | No | Array of ArrayBuffer, Blob, string, or any typed array. Any other type will be stringified. Strings are encoded as UTF-8. name | string | No | The name or path of the file options | {type?: string, lastModified?: number} | Yes | 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.

Properties

lastModified

Unix timestamp of the last known modification of the file

Type number
Settable No
Change events 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
Change events No

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