forked from MapComplete/MapComplete
Add download button to import helper
This commit is contained in:
parent
50d383279d
commit
f441eb2f0a
3 changed files with 23 additions and 7 deletions
2
Utils.ts
2
Utils.ts
|
@ -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") {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue