Update HTTPUpdateServer.h to Fix SPIFFS Update error: Bad Size Given#11586
Update HTTPUpdateServer.h to Fix SPIFFS Update error: Bad Size Given#11586me-no-dev merged 3 commits intoespressif:masterfrom
Conversation
if (!Update.begin(SPIFFS.totalBytes(), U_SPIFFS)) {
throws an error "Update error: Bad Size Given". Changing to
if (!Update.begin(UPDATE_SIZE_UNKNOWN, U_SPIFFS)) {
fixes espressif#9967
👋 Hello kapyaar, we appreciate your contribution to this project! 📘 Please review the project's Contributions Guide for key guidelines on code, documentation, testing, and more. 🖊️ Please also make sure you have read and signed the Contributor License Agreement for this project. Click to see more instructions ...
Review and merge process you can expect ...
|
|
@me-no-dev is it planned to replace the dead horse spiffs with LittleFS in HTTPUpdateServer? |
|
Actually here the size of the FS partition should be read and used. Code can be abstracted to flash any FS type, instead of just SPIFFS |
|
If there is a better approach to handle this, Please update or let me know, I can do another PR. One way or the other, It would be great to get this fixed, as at this point, with each release (for backward compatibility), a manual update of this file is the only way out. |
Removed SPIFFS.h include from HTTPUpdateServer.h
Memory usage test (comparing PR against master branch)The table below shows the summary of memory usage change (decrease - increase) in bytes and percentage for each target.
Click to expand the detailed deltas report [usage change in BYTES]
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Sorry for the delay! Will be part of 3.3.1 tomorrrow |
if (!Update.begin(SPIFFS.totalBytes(), U_SPIFFS)) {
throws an error "Update error: Bad Size Given". Changing to
if (!Update.begin(UPDATE_SIZE_UNKNOWN, U_SPIFFS)) {
fixes #9967. Submitting a PR as per #9967 (comment)