Skip to content

Commit

Permalink
show instead of download pages from /dir/
Browse files Browse the repository at this point in the history
  • Loading branch information
visualapproach committed May 13, 2023
1 parent 0e04ff8 commit f10bf34
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Code/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1328,7 +1328,9 @@ void handleDir()
while (root.next())
{
// Serial.println(root.fileName());
mydir += F("<a href=\"/") + root.fileName() + "\">" + root.fileName() + "</a>";
String href = root.fileName();
if (href.endsWith(".gz")) href.remove(href.length()-3);
mydir += F("<a href=\"/") + href + "\">" + root.fileName() + "</a>";
mydir += F(" Size: ") + String(root.fileSize()) + F(" Bytes ");
mydir += F(" <a href=\"/remove/?FileToRemove=") + root.fileName() + F("\">remove</a><br>");
}
Expand Down

0 comments on commit f10bf34

Please sign in to comment.