public async Task <IActionResult> DownloadRegistrationDataFormatAndRulesGuideAsync()
        {
            var fileName   = DocumentResource.TlevelDataFormatAndRulesGuide.Registrations_Data_Format_And_Rules_Guide_File_Name_Text;
            var fileStream = await _documentLoader.GetBulkUploadRegistrationsTechSpecFileAsync(fileName);

            if (fileStream == null)
            {
                _logger.LogWarning(LogEvent.FileStreamNotFound, $"No FileStream found to download bulk upload registration tech spec document. Method: GetBulkUploadRegistrationsTechSpecFileAsync(FileName: {fileName})");
                return(RedirectToRoute(RouteConstants.PageNotFound));
            }

            fileStream.Position = 0;
            return(new FileStreamResult(fileStream, "text/xlsx")
            {
                FileDownloadName = fileName
            });
        }
Example #2
0
 public async override Task When()
 {
     ActualResult = await Loader.GetBulkUploadRegistrationsTechSpecFileAsync(FileName);
 }