The File interface provides information about files and allows JavaScript in a web page to access their content.

Documentation File by Mozilla Contributors, licensed under CC-BY-SA 2.5.

See also:

Constructor

new(fileBits:Array<EitherType<EitherType<ArrayBufferView, ArrayBuffer>, EitherType<Blob, String>>>, fileName:String, ?options:Null<FilePropertyBag>)

Throws:

null

DOMError

Variables

read onlylastModified:Int

Returns the last modified time of the file, in millisecond since the UNIX epoch (January 1st, 1970 at Midnight).

read onlyname:String

Returns the name of the file referenced by the File object.

Inherited Variables

Defined by Blob

read onlysize:Int

The size, in bytes, of the data contained in the Blob object.

read onlytype:String

A string indicating the MIME type of the data contained in the Blob. If the type is unknown, this string is empty.

Inherited Methods

Defined by Blob

slice(?start:Int, ?end:Int, ?contentType:String):Blob

Returns a new Blob object containing the data in the specified range of bytes of the source Blob.

Throws:

null

DOMError