This file provides utilities for handling files in an environment-independent way, including functions to save files and wrappers around the FileReader API to integrate with Leaflet's event system.
Methods
-
private, inner saveAs(data, filenameopt, dataTypeopt)
-
Saves data as a file with a specified filename and data type.
Parameters:
Name Type Attributes Description data
string | Blob | BlobPart | Array.<BlobPart> The data to be saved.
filename
string <optional>
The name of the file to save.
dataType
string <optional>
The MIME type of the file, used to specify the file format.
-
inner saveFile(data, filenameopt, dataTypeopt)
-
Saves data to a file with the given filename. This function is an alias to the
saveAs
function. or it can use the IITC Mobile file chooser (overwritten in app.js). ThedataType
parameter can be used to filter file types in the IITCm file chooser.Parameters:
Name Type Attributes Description data
string | BlobPart | Array.<BlobPart> The data to be saved.
filename
string <optional>
The name of the file to save.
dataType
string <optional>
The MIME type of the file, used to specify the file format.