Fix minimal compile error

This commit is contained in:
Theo Arends 2021-01-08 17:31:16 +01:00
parent 28714a9ac3
commit 1843b585a9
1 changed files with 5 additions and 4 deletions

View File

@ -396,6 +396,8 @@ void UFSDelete(void) {
* Web support * Web support
\*********************************************************************************************/ \*********************************************************************************************/
#ifdef USE_WEBSERVER
const char UFS_WEB_DIR[] PROGMEM = const char UFS_WEB_DIR[] PROGMEM =
"<p><form action='" "ufsd" "' method='get'><button>" "%s" "</button></form></p>"; "<p><form action='" "ufsd" "' method='get'><button>" "%s" "</button></form></p>";
@ -645,6 +647,8 @@ void UfsUpload(void) {
} }
} }
#endif // USE_WEBSERVER
/*********************************************************************************************\ /*********************************************************************************************\
* Interface * Interface
\*********************************************************************************************/ \*********************************************************************************************/
@ -665,10 +669,7 @@ bool Xdrv50(uint8_t function) {
case FUNC_WEB_ADD_HANDLER: case FUNC_WEB_ADD_HANDLER:
Webserver->on("/ufsd", UfsDirectory); Webserver->on("/ufsd", UfsDirectory);
Webserver->on("/ufsu", HTTP_GET, UfsDirectory); Webserver->on("/ufsu", HTTP_GET, UfsDirectory);
Webserver->on("/ufsu", HTTP_POST,[]() { Webserver->on("/ufsu", HTTP_POST,[]() { Webserver->sendHeader("Location","/ufsu"); Webserver->send(303); }, UfsUpload);
Webserver->sendHeader("Location","/ufsu");
Webserver->send(303);
}, UfsUpload);
break; break;
#endif // USE_WEBSERVER #endif // USE_WEBSERVER
} }