Add download button to import helper

This commit is contained in:
Pieter Vander Vennet 2022-03-17 11:01:52 +01:00
parent 50d383279d
commit f441eb2f0a
3 changed files with 23 additions and 7 deletions

View file

@ -646,7 +646,7 @@ In the case that MapComplete is pointed to the testing grounds, the edit will be
* Triggers a 'download file' popup which will download the contents
*/
public static offerContentsAsDownloadableFile(contents: string | Blob, fileName: string = "download.txt",
options?: { mimetype: string }) {
options?: { mimetype: string | "text/plain" | "text/csv" | "application/vnd.geo+json" | "{gpx=application/gpx+xml}"}) {
const element = document.createElement("a");
let file;
if (typeof (contents) === "string") {