-
Notifications
You must be signed in to change notification settings - Fork 13.3k
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
Revamp of the FSBrowser and SDWebServer examples #7182
Conversation
LittleFS based on a #define logic (required adding a second param to open() and replacing 'FILE_WRITE' by "w") + Added size information to file list and a /status request handler to return filesystem status
…r and more neutral), including one for files. Show size of files. Fill "filename" box upon clicking on a file. Sort files alphabetically.
+ Massive cleanup/merge/align with some code from the FSBrowser example and misc refactorings
…ced FSConfig to prevent FS formating. Fixed recursive deletion. Got rid of specific isDir() for SPIFFS.
Refresh only part of the tree when possible. Selecting a file for upload defaults to the same folder as the last clicked file. Removed the Mkdir button on SPIFFS.
Slight refactoring of XMLHttpRequest completion handling
Case insensivity of the extension for the editor and preview.
Added Save/Discard/Help buttons to Editor, discard confirmation on leave, and refresh tree/status upon save. Removed redundant Ctrl-Z + Ctrl-Shift-Z shortcut declarations. Small bug fixes. + some refactoring
…path as response to the delete request. Refactoring
…tip. Unsupported files on SPIFFS (files at root not sarting with "/", files with double "/", files ending with "/") are now detected and reported in the page.
Added "loading" screen during async operations (dim with spinner and status). Fixed "discard" feature that kept prompting even after an image was loaded. Improved refresh of parts of the tree, with recursive listing. Moved the "path" id attribute to the "li" elements for folders (was already the case for files). Refactoring and cleanup.
Removed non-functional Upload context menu. Fixed error in response to move requests. Added minified version.
Fixed incompatibilities with SPIFFS. Fixed a race condition between deletion and reinsertion of nodes when multiple folders are refreshed. Fixed missing URL decoding for files with special chars (e.g. space char). Moved info from source code comment to a readme.md file. Added source PNG to git. Cleanup.
…pdate to index.htm.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is rather close. Some replies to the unresolved conversations.
…it when required.
Hi devyte, First, many thanks for the extensive review and advice. Much appreciated. Rereading some comments, I realize some moves I made may seem to come out of the blue, but this version is really a merge between the original FSBrowser and SDWebServer. For example, the fact that the page is With the latest requested changes (and removal of local urlDecode()), I think the version is quite OK. With respect to the "is the server alive ?" use of Please don't hesitate to test in real life and report of course. If everything is OK, I now have two PRs on my TODO list:
Regarding that last point, do you still have a html page at hand that calls the graphs.js file ? I would like to know how it's meant to work before refactoring. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well done, approved!
About the two PRs, let's discuss in gitter, just @ me in the channel. |
Following a discussion in issue #7002 , I proposed to unify the versions (FSBrowser and SDWebServer) and make it a "universal" FS browser. I also tried to modernize calls (e.g. using SDFS instead of SD).
One thing leading to another, I ended up improving usability and adding many features, such as a file size, free space bargraph and rename/move features.
So this is kind of "FSBrowser on steroïds". Hope you'll like it.
Please don't hesitate to test and give feedback.
Here is the hi-level changelog :
Fixes to work on LittleFS based on SDFS
UI/usability improvements
Other