new FileReader()
Leaflet wrapper over FileReader Web API,
making it compatible with the Leaflet event system.
This class extends L.Evented
.
Extends
- L.Evented
Methods
-
static loadFile(optionsopt) → {L.FileReader}
-
Instantiates a
L.FileReader
object and initiates a file chooser dialog. This function simulates a click on a hidden file input element created with the given options. Theread
method is called with the file chosen by the user.Parameters:
Name Type Attributes Description options
Object <optional>
Options for the file input element.
-
static read(fileopt, optionsopt) → {L.FileReader}
-
Starts reading the contents of the specified file using reader method specified in
options
. Note: all 'init*' event handlers expected to be already attached before this method call.Parameters:
Name Type Attributes Description file
Blob <optional>
The file or blob to be read. Optional if already set.
options
Object | string <optional>
Options for file reading. Same as in constructor.