images array created

This commit is contained in:
2026-01-26 11:09:27 +01:00
parent 11ec31e09c
commit 665c68e041
3 changed files with 122 additions and 311 deletions
+45
View File
@@ -0,0 +1,45 @@
const char index_html[] PROGMEM = R"rawliteral(
<!DOCTYPE HTML><html>
<head>
<title>LED Panel Control</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body { font-family: Arial; text-align: center; margin:0px auto; padding-top: 30px;}
.button {
background-color: #4CAF50;
color: white;
padding: 10px 20px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
margin: 4px 2px;
cursor: pointer;
}
</style>
</head>
<body>
<h1>LED Panel Control</h1>
<input type="file" id="imageFile" accept=".json">
<button class="button" onclick="uploadImage()">Upload Image</button>
<script>
function uploadImage() {
var file = document.getElementById('imageFile').files[0];
if (!file) {
alert("Please select a file!");
return;
}
var reader = new FileReader();
reader.onload = function(e) {
var contents = e.target.result;
var xhr = new XMLHttpRequest();
xhr.open("POST", "/upload", true);
xhr.setRequestHeader("Content-Type", "application/json");
xhr.send(contents);
};
reader.readAsText(file);
}
</script>
</body>
</html>
)rawliteral";