public IActionResult PhysicalFile(bool fileName, bool etag) { string webRoot = _hostingEnvironment.WebRootPath; ResumePhysicalFileResult result = this.ResumePhysicalFile(Path.Combine(webRoot, "TestFile.txt"), "text/plain", fileName ? "TestFile.txt" : null, etag ? EntityTag : null); result.LastModified = _lastModified; return(result); }
public IActionResult PhysicalFile(bool fileName) { string webRoot = _hostingEnvironment.WebRootPath; var result = new ResumePhysicalFileResult(Path.Combine(webRoot, "TestFile.txt"), "text/plain") { FileInlineName = "TestFile.txt", LastModified = _lastModified }; return(result); }