public ActionResult ConfirmType(string fileName, string filePath, int fileType, string fileTypeName, bool setFileTypeName, bool duplicateName) { UploadViewConfirmType confirmTypeModel = new UploadViewConfirmType { FileName = fileName, FilePath = filePath, FileType = fileType, FileTypeName = fileTypeName, SetFileTypeName = setFileTypeName, DuplicateName = duplicateName }; return View("ConfirmType", confirmTypeModel); }
public ActionResult ConfirmType(UploadViewConfirmType confirmTypeModel) { var fileType = confirmTypeModel.FileTypeName; var fileName = confirmTypeModel.FilePath; var currentFileTypeNames = (db.IngestionFileTypes.Select(x => x.IngestionFileTypeName)).ToList(); if (currentFileTypeNames.Contains(fileType)) { fileType = MakeUniqueFileTypeName(fileType); return RedirectToAction("ConfirmType", new { fileName = confirmTypeModel.FileName, filePath = confirmTypeModel.FilePath, fileType = confirmTypeModel.FileType, fileTypeName = fileType, setFileTypeName = true, duplicateName = true }); } return RedirectToAction("SaveUploadedFileAsFileType", new {fullFileName = fileName, fileTypeName = fileType}); }