BlockUIFileDownloadWeb.Controllers.HomeController.CreateFile C# (CSharp) Method

CreateFile() private method

private CreateFile ( ) : Stream
return Stream
        private Stream CreateFile()
        {
            //to simulate a server process taking a few seconds to render the PDF file:
            Thread.Sleep(5000);
            var filePath = Request.MapPath("~/Content/CustomerInfoSheet.pdf");
            return new FileStream(filePath, FileMode.Open);
        }