/// <summary> /// GET /home/streaming /// </summary> public IActionResult Streaming() { var outputStream = new MemoryStream(); InMemoryPdfReport.CreateStreamingPdfReport(_hostingEnvironment.WebRootPath, outputStream); return(new FileStreamResult(outputStream, "application/pdf") { FileDownloadName = "report.pdf" }); }
/// <summary> /// GET /home/streaming /// </summary> public async Task <IActionResult> Streaming() { return(await RunThrottledAsync(() => { var outputStream = new MemoryStream(); InMemoryPdfReport.CreateStreamingPdfReport(_hostingEnvironment.WebRootPath, outputStream); return new FileStreamResult(outputStream, "application/pdf") { FileDownloadName = "report.pdf" }; })); }