This standalone html code for win pc does what i am trying to accomplish using Asyncwebserver:
[<html>
<head>
<title>README</title>
</head>
<body>
<div><object data="C:\users\1234\Desktop\Notes\LOG07042020.TXT" width="100%" height="800"></object></div>
<br><h2><a href=http://10.0.0.100:8030/Weather >Home</a>
</body>
</html>
instead of "C:\users\1234\Desktop\Notes\LOG07042020.TXT" I would like to use a variable.
My attemps using code from Asyncwebserver documentation for sending html code have all failed.
Mt latest attempt:
String resp = "<!DOCTYPE html><html><head><title>Observations</title></head><body>";
resp += "<div><object data" + fn + " width='100%' height='800'></object></div>";
resp += "<br><h2><a href=http://10.0.0.100:8030/SdBrowse >SdBrowse</a></body></html>";
AsyncWebServerResponse *response = request->beginResponse(200, "text/html", resp);
response->addHeader("Access-Control-Allow-Origin","*");
request->send(response);
Compiles; does add urllink; however, plain text log file is not displayed. An example for fn would be "/LOG06142021.TXT." Have tried inserting filename; still no text display.
William