This commit is contained in:
divadiow
2025-08-19 07:50:37 +01:00
committed by GitHub
parent 9adcd9950f
commit e5b1b864fa
15 changed files with 19 additions and 19 deletions

View File

@ -3310,7 +3310,7 @@ int http_fn_ota(http_request_t* request) {
#ifdef OBK_OTA_NAME_EXTENSION
OBK_OTA_NAME_EXTENSION
#endif
OBK_OTA_EXTENSION "/,SR=R.source,mr=(e)=>e.name.match(R);doota=()=>{f=o.files[0];if(f&&(f)){d.showModal();var t=30;setTimeout(()=>{d.close(),location.href='/'},1e3*t),setInterval(()=>d.innerHTML=D+t--+' secs',1e3),fetch('/api/ota',{method:'POST',body:f}).then((e)=>{e.ok&&fetch('/index?restart=1')})}else alert(f?'filename invalid':'no file selected')};d.innerHTML=D,o.addEventListener('change',((e)=>{const t=e.target.files[0];if(!t)return;h.innerHTML=mr(t)?'':'Selected file does <b>not</b> match reqired format '+SR+'!'}))</script>";
OBK_OTA_EXTENSION "/,SR=R.source,mr=(e)=>e.name.match(R);doota=()=>{f=o.files[0];if(f&&(f)){d.showModal();var t=30;setTimeout(()=>{d.close(),location.href='/'},1e3*t),setInterval(()=>d.innerHTML=D+t--+' secs',1e3),fetch('/api/ota',{method:'POST',body:f}).then((e)=>{e.ok&&fetch('/index?restart=1')})}else alert(f?'filename invalid':'no file selected')};d.innerHTML=D,o.addEventListener('change',((e)=>{const t=e.target.files[0];if(!t)return;h.innerHTML=mr(t)?'':'Selected file does <b>not</b> match required format '+SR+'!'}))</script>";
poststr(request, "<br><br><br>Expert feature: Upload firmware OTA file.<br>If unsure, please use Web App!<br><span id='hint' style='color: yellow;'></span><br><br>");
poststr(request, "<input id='otafile' type='file' accept='" OBK_OTA_EXTENSION "'>");

View File

@ -228,7 +228,7 @@ static void tcp_server_thread(beken_thread_arg_t arg)
}
if (err != kNoErr)
ADDLOG_ERROR(LOG_FEATURE_HTTP, "Server listerner thread exit with err: %d", err);
ADDLOG_ERROR(LOG_FEATURE_HTTP, "Server listener thread exit with err: %d", err);
lwip_close(tcp_listen_fd);