This settings panel is backed by the "settings" dashboard object see Dashboard.init call at the top of index.html - and, consequently, by the "settings" fieldset in mongoose_dashboard.c.
Fields are bound to the dashboard object via the data-bind attribute, e.g. data-bind="setttings.name"
When you save changed fields, the changes are saved to the device.
The "NAME" field has data-autosave="1", so it is autosaved when user types text.
The other fields are not auto-saved, so when they are changed, dashboard.js automatically applies CSS class "edited" to them to indicate they were changed but not saved.
The cancel and save buttons are attached to the settings object via the data-cancel and data-save attributes. Those buttons get automatically enabled or disabled based on editing status.
{
"version": "1.2.3",
"url": "http://my-product.com/firmwares/firmware-1.2.3.bin",
"size": 324645
}
This file manager uses /fs/ directory. It works on any platform that supports standard file IO: fopen, fread, fwrite, fclose. This includes Linux/Mac/Windows.
Mongoose provides a built-in LittleFS integration that makes standard file IO work on embedded systems like STM32. For that, add "#define MG_ENABLE_LFS 1" to your mongoose_config.h
See this ready-to-build example which implements LittleFS on Nucleo-H563ZI internal flash. You can upload, delete and serve files on STM32 - which is a perfect use case for confuration files, keeping and viewing logs, etc.