You are reading a single comment by @user158016 and its replies. Click here to read the full conversation.
  • So can we use spiffs or any other way to load files to storage?
    I really want to serve react files from storage (react app) with webserver and websockets on my esp32

    Can this be done, or what needs to happen for it?

  • use spiffs or any other way to load files to storage

    The Storage https://www.espruino.com/Reference#Storage already has its own simplified filesystem so no spiffs is needed/possible there. The main feature of Storage is that each file takes continuous area of flash and files are directly mappable to some memory address. The disadvantage is that you cannot append to such file or overwrite existing data, you need to create it with some size and either fill it with data completely at creation time or write only to areas not written yet = bytes with all bits set (0xff = 255). So it is something between low level flash access and simplified filesystem.

    Then there is a hybrid on top of it https://www.espruino.com/Reference#StorageFile which can append but cannot write/contain 0xff=255 bytes.

    But while it is limited as described it can work just fine for serving text files with webserver.

About

Avatar for user158016 @user158016 started