Skip to content

SDWebServer Example - Link in /edit/index.htm not working #4437

Closed
@PhilippRott

Description

@PhilippRott

Description

If you try to edit files on the sdcard by espXX.local/edit, this will work only, if file is in root path like: "/test.txt"

If you create a folder on the sd-card "/folder1/test.txt" the link on tree-view is:
<li id="/folder1/folder1/test.txt"> ...

So, the path will be double and the link is not working - files can not be edited or displayed.

My solution to fix this problem:

edit line 378 in Arduino/libraries/ESP8266WebServer/examples/SDWebServer/SdRoot/edit/index.htm
change this:
leaf.id = (((path == "/")?"":path)+"/"+name).toLowerCase();
to following:
leaf.id = (((path == "/")?"":"")+"/"+name).toLowerCase();

Hardware

Hardware: ESP32, but expecting the same for esp8266, because its a html problem!

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions