-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
SPIFFSeditor file iterator not compatible with LittleFS #879
Comments
@sticilface |
ah i see. A bit more work is involved, i also forgot the exclude list! I'm currently having a bit of a nightmare trying to bring all my ESPs up to date from late 2018 so i can't really work on it now. Is there a plan to bring littleFS to ESP32? |
and ... it is considered for the next generation of the core (2.x): |
Not easy to be made ideally compatible to SPIFFS, to esp8266 LittleFS implementation and the esp32 IDF / vfs concept |
mmm.. that's what I was thinking should be the goal. I found it very useful for development and tweaking things without having to upload new files constantly. The other way.. might be to just make the FSEditor totally independent of the filesystem and it takes a linking class and uses callbacks to populate the data... this can be customised to each use case. Moving forward... It would also allow it to be used with SD cards and the likes. FSwebhandle = & webServer.addHandler(new FSEditor( SPIFFSEditorimpl, "user", "pass" )); or FSwebhandle = & webServer.addHandler(new FSEditor( LittleFSEditorimpl, "user", "pass" )); now we are moving towards.. two platforms and two file systems, as it is with all the |
My JS is rubbish. I've had a look at your fork. what are the changes in edit.htm that you have made? I'm currently refactoring using templates in a mostly transparent way. I'm also wondering if this just needs to be a operate lib. or a submodule |
I'm writing a version of this that should be much more flexible, be platform and FS independent just requiring an interface class... I'm trying to allow multiple instances, so permit setting the URL of the editor in the constructor. unfortunately the here ESPAsyncWebServer/src/edit.htm Line 542 in f6fff3f
and ESPAsyncWebServer/src/edit.htm Line 554 in f6fff3f
I really have no idea with JS unfortunately, and can't really test it either. |
Ok scratch that previous comment. I've managed to do it, i've now got an independent lib based on SPIFFSEditor that
server.addHandler(new FSEditor_ESP8266_SPIFFS("editSFS", SPIFFS ));
server.addHandler(new FSEditor_ESP8266_LITTLEFS("/editLFS", LittleFS )); I've actually written a lib called FSTools that is waiting for merge with the ESP8266 Core that allows some weird and wonderful FS stuff like converting between file system types and mounting two different partition types at the same time.
Currently there is not "much" difference functionally between the implementations, and as i mentioned the ESP32 is missing. I could drop the dependence on I'd be interested on your thoughts? |
[STALE_SET] This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions. |
Any thoughts? |
[STALE_DEL] This stale issue has been automatically closed. Thank you for your contributions. |
This issue really should still be open. @sticilface your solution seems on the right track but I haven't had time to really dig into it. It would be nice if FSEditor had at least a basic README |
I'm finally evaluating @lorol's fork for LittleFS compatibility (and planning to add support for SD and multiple FS sources simultaneously). Some notes in case it helps anyone here: One big change if you're used to the original SPIFFSEditor example: the editor and required files like javascript code are stored in the filesystem, so you need to use the Data Upload tool to load these before they'll work. Edit.htm can be stored in program flash (by commenting out If you want to try the SmartSwitch example, I got it to work by:
|
Probably goes without saying that the clue is in the name, but still...
I needed to modify my file iterator to be able to call recursively for directory structures. As you can see below, the files list contains a directory which the editor displays as a file.
![Screenshot 2020-11-07 at 10 55 52](https://user-images.githubusercontent.com/10061736/98439196-1dd60980-20e8-11eb-82c8-0decd1afbc51.png)
![Screenshot 2020-11-07 at 10 55 44](https://user-images.githubusercontent.com/10061736/98439198-20d0fa00-20e8-11eb-9a49-639331e7f885.png)
I have a working fix for esp8266 that looks like this
and finally.. the business end changed to...
However, I've not used SPIFFS very much with ESP32 and have not developed on it in a very long time. How different are the FS APIs and does ESP32 support LittleFS now / is planning to?
I can make a pull request, should probably change it to FSEditor as well rather than SPIFFS..
Thoughts?
The text was updated successfully, but these errors were encountered: