EspFileManager

EspFileManager

The Web ESP File Manager has been slightly modified to allow folder deletion [at the moment a Folder needs to be empty prior to its deletion]

Three files are neceesary:

EspFileManager.cpp

EspFileManager.h

The page wePpage.html needs to be encoded and zipped using this converter into webPage.h

How does it work:

A web server has to be instanciated together with an instance of the EspFileManager

AsyncWebServer server(80); EspFileManager FileManager;

The file manager needs to be connected to the SD card (SD is the variable associated with the SD card software in SD.h)

FileManager.initSDCard(&SD); FileManager.setServer(&server);

That’s it.

When the page’s URL /file is accessed by a navigator (eg. http://a7670.local/file) , the webPage is loaded, it includes javascript that calls internal pages scanning the SD directory and displaying the results.

The original code is fairly simple, a delete directory button and associated internal page has been added.

At the moment it is not recursive, as this is painfull when deleting crowded directories, I’ll probably add this in the future.