I have the following folder structure on my ASP.NET Core server (.NET5.0):
- wwwroot\MyXmlFiles\foo.xml
The files can be accessed as static files as https://myserver.com/MyXmlFiles/foo.xml. However, I would like to make the file available via WebApi controller action:
[HttpGet("{uri}")]
public string Get(string uri)
{
// How do I return the foo.xml file content here
// without redirection or loading it to memory?
}