-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Update HTTPUpdateServer.h to Fix SPIFFS Update error: Bad Size Given #11586
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
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. |
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)