Skip to content

Add SPIFFS.unmount() for use in OTA.onEnd() #1657

Closed
@andig

Description

@andig

Use case: allow to store configuration from ram back to freshly updated SPIFFS. Avoid loss on configuration due to OTA wiping the filesystem config files.

Potential flow:

// OTA update overwrites SPIFFS and unmounts the SPIFFS library

ArduinoOTA.onEnd([]() {
  if (SPIFFS.begin()) {
    // write config files to spiffs again
  }
});

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions