4 Commits

Author SHA1 Message Date
Proddy
7cad4b2c8d Merge pull request #3076 from proddy/dev
3.8.3
2026-05-12 21:29:47 +02:00
proddy
76a68629d1 3.8.3 2026-05-12 21:28:42 +02:00
proddy
27f2cb0693 package update 2026-05-12 21:23:13 +02:00
proddy
2f18bfcce3 fix json OTA upload 2026-05-12 21:23:13 +02:00
5 changed files with 13 additions and 13 deletions

View File

@@ -71,6 +71,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- board profile `CUSTOM` can only be selected in developer mode - board profile `CUSTOM` can only be selected in developer mode
- mqtt sends round values without decimals (`28` instead of `28.0`) - mqtt sends round values without decimals (`28` instead of `28.0`)
## [3.8.0] 31 December 2025 ## [3.8.0] 31 December 2025
## Added ## Added

View File

@@ -9,5 +9,3 @@ For more details go to [emsesp.org](https://emsesp.org/).
## Fixed ## Fixed
## Changed ## Changed

View File

@@ -4,7 +4,6 @@
#include <esp_app_format.h> #include <esp_app_format.h>
#include <esp_ota_ops.h> #include <esp_ota_ops.h>
// #include <esp_partition.h>
static String getFilenameExtension(const String & filename) { static String getFilenameExtension(const String & filename) {
const auto pos = filename.lastIndexOf('.'); const auto pos = filename.lastIndexOf('.');
@@ -133,9 +132,10 @@ void UploadFileService::handleUpload(AsyncWebServerRequest * request, const Stri
} }
if (_is_firmware || _is_filesystem) { if (_is_firmware || _is_filesystem) {
if (!request->_tempObject) { // if we haven't delt with an error, continue with the OTA update if (!request->_tempObject) {
//continue with the OTA update
if (Update.write(data, len) != len) { if (Update.write(data, len) != len) {
emsesp::EMSESP::logger().err("Update.write failed at offset %u (chunk %u): %s", emsesp::EMSESP::logger().err("OTA update failed at offset %u (chunk %u): %s",
static_cast<unsigned>(Update.progress()), static_cast<unsigned>(Update.progress()),
static_cast<unsigned>(len), static_cast<unsigned>(len),
Update.errorString()); Update.errorString());
@@ -144,15 +144,16 @@ void UploadFileService::handleUpload(AsyncWebServerRequest * request, const Stri
} }
if (final) { if (final) {
if (!Update.end(true)) { if (!Update.end(true)) {
emsesp::EMSESP::logger().err("Update.end failed: %s", Update.errorString()); emsesp::EMSESP::logger().err("OTA update failed: %s", Update.errorString());
handleError(request, 500); handleError(request, 500); // internal error, failed
return; return;
} }
} }
} else {
if (len && len != request->_tempFile.write(data, len)) { // stream the incoming chunk to the opened file
handleError(request, 507); // 507-Insufficient Storage
} }
} else {
// stream the incoming chunk to the opened file
if (len && len != request->_tempFile.write(data, len)) {
handleError(request, 507); // 507-Insufficient Storage
} }
} }
} }

View File

@@ -1 +1 @@
#define EMSESP_APP_VERSION "3.8.2" #define EMSESP_APP_VERSION "3.8.3-dev.0"