Andrew Boyson / web

Dependents:   oldheating gps motorhome heating

Revision:
156:005785e4740e
Parent:
152:edbf676b08ca
Child:
157:57bd76aa5e97
--- a/base/firmware/web-firmware-script.inc	Sun Jan 24 15:06:33 2021 +0000
+++ b/base/firmware/web-firmware-script.inc	Sun Jan 24 18:54:27 2021 +0000
@@ -28,6 +28,10 @@
 "              'Total ' + e.total  + ' bytes\\r\\n' +\n"
 "              'Sent  ' + e.loaded + ' bytes');\n"
 "}\n"
+"function xhrUploadComplete(e)\n"
+"{\n"
+"    logUpload('Saving ' + e.loaded  + ' bytes...');\n"
+"}\n"
 "function xhrUploadStart()\n"
 "{\n"
 "    logUpload('Upload starting...');\n"
@@ -37,6 +41,7 @@
 "    xhr.onload  = xhrUploadOnLoad;\n"
 "    xhr.onerror = xhrUploadOnError;\n"
 "    xhr.upload.onprogress = xhrUploadProgress;\n"
+"    xhr.upload.onload     = xhrUploadComplete;\n"
 "\n"
 "    xhr.open('POST', '/firmware-ajax'); //Defaults to async=true\n"
 "    xhr.send(file);\n"