Minor corrections

This commit is contained in:
lorol
2020-07-03 18:29:55 -04:00
parent ea80883726
commit 0823e9d940
2 changed files with 7 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
# In this fork
- SPIFFSEditor improvements
- Added [extras](https://github.com/lorol/ESPAsyncWebServer/tree/master/extras) folder with (Win) tools for re-packing, allow editing, updating and compressing html to binary arrays, embedded to source
- Added [extras](https://github.com/lorol/ESPAsyncWebServer/tree/master/extras) folder with (Win) tools for re-packing, editing, updating and compressing html to binary arrays embedded to source
- Added a [SmartSwitch](https://github.com/lorol/ESPAsyncWebServer/tree/master/examples/SmartSwitch) example to test code features
- Applied the memory optimizations from [sascha432](https://github.com/sascha432/ESPAsyncWebServer) fork
- Cookie Authentication including on Websocket part, based on [ayushsharma82](https://github.com/me-no-dev/ESPAsyncWebServer/pull/684) PR, new functions added:
@@ -9,6 +9,7 @@
- [Additions to this README.md from jendakol' PR](https://github.com/me-no-dev/ESPAsyncWebServer/pull/770)
- [Respond with file content using a callback and extra headers](#respond-with-file-content-using-a-callback-and-extra-headers)
- [Serving static files by custom handling](#serving-static-files-by-custom-handling)
- Added LittleFS choice for both [esp8266](https://github.com/esp8266/Arduino/tree/master/libraries/LittleFS) / [esp32](https://github.com/lorol/LITTLEFS) , see [SmartSwitch](https://github.com/lorol/ESPAsyncWebServer/blob/master/examples/SmartSwitch/SmartSwitch.ino#L16 )
------------------------------------------------------------------------------------------
# ESPAsyncWebServer

View File

@@ -240,10 +240,13 @@ void SPIFFSEditor::handleRequest(AsyncWebServerRequest *request){
}
} else if(request->method() == HTTP_DELETE){
if(request->hasParam("path", true)){
if(!(_fs.remove(request->getParam("path", true)->value()))){
#ifdef ESP32
_fs.rmdir(request->getParam("path", true)->value()); // try rmdir for littlefs
_fs.rmdir(request->getParam("path", true)->value()); // try rmdir for littlefs
#endif
_fs.remove(request->getParam("path", true)->value());
}
request->send(200, "", "DELETE: "+request->getParam("path", true)->value());
} else
request->send(404);