write readLength to debug console

1.2-legacy
Jm Casler 2020-12-30 14:52:39 -08:00
rodzic 552406b15f
commit d5f76b16b9
1 zmienionych plików z 3 dodań i 1 usunięć

Wyświetl plik

@ -791,10 +791,12 @@ void handleFormUpload(HTTPRequest *req, HTTPResponse *res)
file.write(buf, readLength);
fileLength += readLength;
DEBUG_MSG("readLength - %i", readLength);
// Abort the transfer if there is less than 50k space left on the filesystem.
if (SPIFFS.totalBytes() - SPIFFS.usedBytes() < 51200) {
file.close();
res->println("<p>Write aborted! File is won't fit!</p>");
res->println("<p>Write aborted! Reserving 50k on filesystem.</p>");
delete parser;
return;