public UploadWizardCompleteModel GenerateUploadWizardCompleteViewModel(EducationSecurityPrincipal user, UploadWizardModel model) { int studentIdColumn = model.CustomFields.Select((v, i) => new { ViewModel = v, Index = i }).First(c => c.ViewModel.SelectedCustomFieldId == 0).Index; using (var stream = new MemoryStream()) { DataFileBlobContainer.DownloadToStream(model.BlobAddress, stream); return(ProcessDataFile(user, model, studentIdColumn, stream)); } }
public DownloadFileModel RetrieveUploadErrorsFile(string blobAddress) { var memoryStream = new MemoryStream(); var downloadFile = new DownloadFileModel { FileName = blobAddress, FileContentStream = memoryStream }; DataFileBlobContainer.DownloadToStream(blobAddress, memoryStream); downloadFile.FileContentStream.Position = 0; return(downloadFile); }