diff --git a/AsyncUpdate.ino b/AsyncUpdate.ino index caa1a38..5afcf72 100644 --- a/AsyncUpdate.ino +++ b/AsyncUpdate.ino @@ -50,6 +50,7 @@ void handleDoUpdate(AsyncWebServerRequest *request, const String& filename, size #endif Update.printError(Serial); } + request->send(200, "text/html", "
Upload complete! Please wait while the device reboots"); } if (Update.write(data, len) != len) { @@ -61,10 +62,6 @@ void handleDoUpdate(AsyncWebServerRequest *request, const String& filename, size } if (final) { - AsyncWebServerResponse *response = request->beginResponse(302, "text/plain", "Please wait while the device reboots"); - response->addHeader("Refresh", "20"); - response->addHeader("Location", "/"); - request->send(response); if (!Update.end(true)){ Update.printError(Serial); } else {