From 4af0e0b962c77fe442f2bc6f355c80c07e417d75 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Sat, 23 Mar 2019 21:10:09 -0700 Subject: [PATCH] Change export URL from data: to blob: so larger settings files can be exported. #2255 --- src/General/Settings.coffee | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/General/Settings.coffee b/src/General/Settings.coffee index 09e205873..d2b64b007 100644 --- a/src/General/Settings.coffee +++ b/src/General/Settings.coffee @@ -215,9 +215,11 @@ Settings = (Settings.downloadExport {version: g.VERSION, date: Date.now(), Conf: Conf2}) downloadExport: (data) -> + blob = new Blob [JSON.stringify(data, null, 2)], {type: 'application/json'} + url = URL.createObjectURL blob a = $.el 'a', download: "<%= meta.name %> v#{g.VERSION}-#{data.date}.json" - href: "data:application/json;base64,#{btoa unescape encodeURIComponent JSON.stringify data, null, 2}" + href: url p = $ '.imp-exp-result', Settings.dialog $.rmAll p $.add p, a