Skip to content
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

SPIFFS update #46

Closed
garageeks opened this issue Feb 13, 2021 · 1 comment
Closed

SPIFFS update #46

garageeks opened this issue Feb 13, 2021 · 1 comment

Comments

@garageeks
Copy link

garageeks commented Feb 13, 2021

It would be useful to add SPIFFS update option. Ideally it should be made right after the main FOTA update, before rebooting. This is because updating SPIFFS won't result into a FW_VERSION change, therefore it will be stuck in a catch 22 until the SPIFFS binary is deleted from server.

I tried to make this modification but it is not enough. The good thing is that the underlying ESP32 OTA function support SPIFFS update, it just needs a flag.

  // check contentLength and content type
    if (contentLength && isValidContentType)
    {
        // Check if there is enough to OTA Update
		if(spiffsFlag) {
			canBegin = Update.begin(contentLength,true);
		} else {
			canBegin = Update.begin(contentLength);
		}			

        // If yes, begin
        if (canBegin)
        {
			if(spiffsFlag) {
				Serial.println("Begin SPIFFS OTA...");
			} else {
				Serial.println("Begin FW OTA...");
			}	
@tobozo
Copy link
Collaborator

tobozo commented Feb 15, 2021

see #47

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants