-
Notifications
You must be signed in to change notification settings - Fork 13.3k
SDWebServer Example - Link in /edit/index.htm not working #4437
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
Comments
Would you like to submit a PR for your fix? Seems like you've already got a failing and passing test case with it, and it'll get your name in the "git blame" for all time. :) |
I never tried to submit a PR before, need to read how to do this in the correct way ;-) |
If it's a problem I can do it with your info here, but it's not too complicated...there are official readmes, but below is my general flow: Fork the repo from github website
Go back to your forked repo @ GH and there'll be a new button saying "Branch X pushed Y mins ago. Click here to cubmit a pull request") |
thanks for your help, my PR is now pending... |
@earlephilhower seems to finished with a PR error - any idea what's the problem? |
I just restarted it. There was a build timeout (you can check the details link at the bottom), sometimes happens when there's heavy load on the CI system. |
PR #4451 fixes, link |
Related to #5525 |
@earlephilhower what's the status here? I see the PR is ready, I assume it just needs testing? |
The PR's not in an acceptable state ( I need to verify the actual error, too. I don't remember seeing it fail. |
Pushing back after internal discussion |
I've tested the existing code and am not able to reproduce any failures. I've looked at pre-existing files in subdirs on the card, and all is well. If I make /d1/d2/hello.txt, I can open it just find in the editor while navigating down on the LHS. If I use the "mkdir" button to make a subdir and then the mkfile button is pressed, I also have no problem and the links on the LHS are all good. Closing as can't repro... |
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!
The text was updated successfully, but these errors were encountered: