diff --git a/static/index.html b/static/index.html
index 25bcd59..eea17bc 100644
--- a/static/index.html
+++ b/static/index.html
@@ -255,7 +255,10 @@
-
+
+
@@ -310,6 +313,19 @@
}
}
+ function setOTAFirmwarePath(url) {
+ var xhr = new XMLHttpRequest();
+ xhr.open('GET', url, true);
+ xhr.responseType = 'json';
+ xhr.onload = function() {
+ var status = xhr.status;
+ if (status === 200) {
+ document.querySelector("#download_ota_form").action = xhr.response.builds[0].ota.path;
+ }
+ };
+ xhr.send();
+ };
+
document.querySelectorAll('div.radios input').forEach((radio) =>
radio.addEventListener("change", () => {
const button = document.querySelector("esp-web-install-button");
@@ -337,6 +353,7 @@
}
button.manifest = `${hardware}${protocol}-manifest.json`;
+ setOTAFirmwarePath(button.manifest);
})
);