class

DomFile

@Js
class DomFile : Obj

DomFile models a DOM File object.

methods ext

Return file name extension (everything after the last dot) or null name has no dot

size

Size of file in bytes

readAsDataUri

Asynchronously load file contents as a data: URI representing the file's contents

name

Name of file

readAsText

Asynchronously load file contents as text and invoke the callback function with results

fromNative

Create a DomFile instance from a native JavaScript DOM file

type

MIME type of the file as a read-only string or "" if the type could not be determined

ext Str? ext()

Return file name extension (everything after the last dot) or null name has no dot.

fromNative @Js
static DomFile fromNative(Obj file)

Create a DomFile instance from a native JavaScript DOM file.

name Str name()

Name of file. This is just the file name, and does not include any path information.

readAsDataUri Void readAsDataUri(|Uri| f)

Asynchronously load file contents as a data: URI representing the file's contents.

readAsText Void readAsText(|Str| f)

Asynchronously load file contents as text and invoke the callback function with results.

size Int size()

Size of file in bytes.

type Str type()

MIME type of the file as a read-only string or "" if the type could not be determined.

Haxall 4.0.5 ∙ 24-Feb-2026 14:33 EST