Skip to content

Commit

Permalink
handleFile
Browse files Browse the repository at this point in the history
  • Loading branch information
dontsovcmc committed Sep 17, 2023
1 parent 2a7a19f commit 3725da9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions WiFiManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,7 @@ void WiFiManager::setupHTTPServer(){
server->on(WM_G(R_erase), std::bind(&WiFiManager::handleErase, this, false));
server->on(WM_G(R_status), std::bind(&WiFiManager::handleWiFiStatus, this));

server->on(WM_G(R_style_min_css),std::bind(&WiFiManager::handleFile, this, WM_G(HTTP_TEXT_CSS), style_min_css));
server->on(WM_G(R_style_min_css),std::bind(&WiFiManager::handleFile, this, HTTP_TEXT_CSS, style_min_css));

server->onNotFound (std::bind(&WiFiManager::handleNotFound, this));

Expand Down Expand Up @@ -1446,13 +1446,14 @@ void WiFiManager::handleWifi(boolean scan) {
#endif
}

void WiFiManager::handleFile(const char *progmem_file_type,
void WiFiManager::handleFile(PGM_P progmem_file_type,
PGM_P progmem_string)
{
#ifdef WM_DEBUG_LEVEL
DEBUG_WM(DEBUG_VERBOSE,F("<- HTTP File"));
#endif
handleRequest();

server->send_P(200, progmem_file_type, progmem_string);
}

Expand Down

0 comments on commit 3725da9

Please sign in to comment.