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.FileReaderobject and initiates a file chooser dialog. This function simulates a click on a hidden file input element created with the given options. Thereadmethod is called with the file chosen by the user.Parameters:
Name Type Attributes Description optionsObject <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 fileBlob <optional>
The file or blob to be read. Optional if already set.
optionsObject | string <optional>
Options for file reading. Same as in constructor.