From 3ad459f055492cd1f10d48ff6c1e4ebed641db21 Mon Sep 17 00:00:00 2001 From: Stewart Allen Date: Tue, 31 Oct 2017 13:14:35 -0400 Subject: [PATCH] push image with gcode --- js/kiri.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/js/kiri.js b/js/kiri.js index a9a7b1d1..fe9ae93a 100644 --- a/js/kiri.js +++ b/js/kiri.js @@ -1026,12 +1026,6 @@ self.kiri.license = exports.LICENSE; setProgress(Math.ceil(evt.loaded/evt.total), "sending"); }); filename = $('print-filename').value; - if (screenShot) { - var post = new XMLHttpRequest(); - post.open("POST", host + "/api/image?filename=" + filename); - post.setRequestHeader("Content-Type", "text/plain"); - post.send(screenShot); - } xhtr.open("POST", host + "/api/print?" + "filename=" + filename + @@ -1042,7 +1036,7 @@ self.kiri.license = exports.LICENSE; "&image=" + filename ); xhtr.setRequestHeader("Content-Type", "text/plain"); - xhtr.send(gcode); + xhtr.send(screenShot ? [gcode,screenShot].join("\0") : gcode); hideModal(); }