aboutsummaryrefslogtreecommitdiffstats
path: root/web/src/js/actions.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/src/js/actions.js')
-rw-r--r--web/src/js/actions.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/web/src/js/actions.js b/web/src/js/actions.js
index 6ded4c44..0f81d7a3 100644
--- a/web/src/js/actions.js
+++ b/web/src/js/actions.js
@@ -117,6 +117,13 @@ export var FlowActions = {
},
clear: function(){
$.post("/clear");
+ },
+ download: () => window.location = "/flows/dump",
+ upload: (file) => {
+ var filereader = new FileReader();
+ filereader.file = file;
+ filereader.onload = (e) => $.post("/flows/dump", e.target.result);
+ filereader.readAsBinaryString(file);
}
};