diff --git a/main/ota_server.c b/main/ota_server.c
index 5515d7a..31b7607 100644
--- a/main/ota_server.c
+++ b/main/ota_server.c
@@ -21,157 +21,6 @@
static const char *TAG = "OTA_SERVER";
-// HTML page for OTA update
-static const char *ota_html =
-""
-""
-"
"
-""
+ "
ESP32 OTA Update
";
+
+ httpd_resp_send_chunk(req, html_part1, strlen(html_part1));
+
+ // Part 2: Info section with dynamic content
+ char info_buf[256];
+ snprintf(info_buf, sizeof(info_buf),
+ "
"
+ "Current Version: %s
"
+ "Free Space: %lu KB"
+ "
", s_version, (unsigned long)(free_space / 1024));
+
+ httpd_resp_send_chunk(req, info_buf, strlen(info_buf));
+
+ // Part 3: Upload area
+ const char *html_part3 =
+ "
"
+ "
Drag and drop firmware file here or click to select
"
+ "
"
+ "
"
+ "
"
+ "
"
+ "
"
+ "
"
+ "
"
+ "
";
+
+ httpd_resp_send_chunk(req, html_part3, strlen(html_part3));
+
+ // Part 4: JavaScript
+ const char *html_part4 =
+ ""
+ ""
+ "";
+
+ httpd_resp_send_chunk(req, html_part4, strlen(html_part4));
+
+ // Send final chunk to complete response
+ httpd_resp_send_chunk(req, NULL, 0);
+
return ESP_OK;
}