diff --git a/libraries/HTTPUpdateServer/src/HTTPUpdateServer.h b/libraries/HTTPUpdateServer/src/HTTPUpdateServer.h index 65d8cbaa783..b59a071fd9a 100644 --- a/libraries/HTTPUpdateServer/src/HTTPUpdateServer.h +++ b/libraries/HTTPUpdateServer/src/HTTPUpdateServer.h @@ -123,7 +123,7 @@ class HTTPUpdateServer { Serial.printf("Update: %s\n", upload.filename.c_str()); } if (upload.name == "filesystem") { - if (!Update.begin(SPIFFS.totalBytes(), U_SPIFFS)) { //start with max available size + if (!Update.begin(UPDATE_SIZE_UNKNOWN, U_SPIFFS)) { //Instead of SPIFFS.totalBytes(). Fix https://github.com/espressif/arduino-esp32/issues/9967 if (_serial_output) { Update.printError(Serial); }