FileReader class
The object lets web applications asynchronously read the
contents of files (or raw data buffers) stored on the user's
computer, using File or Blob objects to specify the file or
data to read.
File objects may be obtained from a FileList object returned
as a result of a user selecting files using the <input>
element, from a drag and drop operation's DataTransfer object,
or from the mozGetAsFile()
API on an HTMLCanvasElement.
can only access the contents of files that the user has
explicitly selected, either using an HTML <input type="file">
element or by drag and drop. It cannot be used to read a file by
pathname from the user's file system. To read files on the
client's file system by pathname, use the File System Access API.
To read server-side files, use standard Ajax solutions, with CORS
permission if reading cross-domain.
Note: This feature is available in Web Workers
EventTarget
FileReader
- Implemented types
- Available extensions
- Annotations
-
- @JS()
- @staticInterop
Constructors
- FileReader()
-
factory
Properties
- error → Exception?
-
Available on FileReader, provided by the PropsFileReader extension
no setter - hashCode → int
-
The hash code for this object.
no setterinherited
-
onabort
↔ EventHandlerNonNull<
Event> ? -
Available on FileReader, provided by the PropsFileReader extension
getter/setter pair -
onerror
↔ EventHandlerNonNull<
Event> ? -
Available on FileReader, provided by the PropsFileReader extension
getter/setter pair -
onload
↔ EventHandlerNonNull<
Event> ? -
Available on FileReader, provided by the PropsFileReader extension
getter/setter pair -
onloadend
↔ EventHandlerNonNull<
Event> ? -
Available on FileReader, provided by the PropsFileReader extension
getter/setter pair -
onloadstart
↔ EventHandlerNonNull<
Event> ? -
Available on FileReader, provided by the PropsFileReader extension
getter/setter pair -
onprogress
↔ EventHandlerNonNull<
Event> ? -
Available on FileReader, provided by the PropsFileReader extension
getter/setter pair - readyState → int
-
Available on FileReader, provided by the PropsFileReader extension
no setter - result → dynamic
-
Available on FileReader, provided by the PropsFileReader extension
no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
abort(
) → void -
Available on FileReader, provided by the PropsFileReader extension
-
addEventListener(
String type, EventListener? callback, [dynamic options]) → void -
Available on EventTarget, provided by the PropsEventTarget extension
-
dispatchEvent(
Event event) → bool -
Available on EventTarget, provided by the PropsEventTarget extension
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
readAsArrayBuffer(
Blob blob) → void -
Available on FileReader, provided by the PropsFileReader extension
-
readAsBinaryString(
Blob blob) → void -
Available on FileReader, provided by the PropsFileReader extension
-
readAsDataURL(
Blob blob) → void -
Available on FileReader, provided by the PropsFileReader extension
-
readAsText(
Blob blob, [String? encoding]) → void -
Available on FileReader, provided by the PropsFileReader extension
-
removeEventListener(
String type, EventListener? callback, [dynamic options]) → void -
Available on EventTarget, provided by the PropsEventTarget extension
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited