|
1 | 1 | #ifndef __HTTP_UPDATE_SERVER_H |
2 | 2 | #define __HTTP_UPDATE_SERVER_H |
3 | 3 |
|
4 | | -#include <SPIFFS.h> |
5 | 4 | #include <StreamString.h> |
6 | 5 | #include <Update.h> |
7 | 6 | #include <WebServer.h> |
@@ -123,7 +122,7 @@ class HTTPUpdateServer { |
123 | 122 | Serial.printf("Update: %s\n", upload.filename.c_str()); |
124 | 123 | } |
125 | 124 | if (upload.name == "filesystem") { |
126 | | - if (!Update.begin(SPIFFS.totalBytes(), U_SPIFFS)) { //start with max available size |
| 125 | + if (!Update.begin(UPDATE_SIZE_UNKNOWN, U_SPIFFS)) { //Instead of SPIFFS.totalBytes(). Fix https://github.com/espressif/arduino-esp32/issues/9967 |
127 | 126 | if (_serial_output) { |
128 | 127 | Update.printError(Serial); |
129 | 128 | } |
|
0 commit comments