public ActionResult UploadGraph(string name, IEnumerable <HttpPostedFileBase> files) { List <string> paths = new List <string>(); foreach (var file in files) { if (file.ContentLength > 0) { var fileName = Path.GetFileName(file.FileName); var path = Path.Combine(Server.MapPath("~/App_Data/Uploads"), fileName); file.SaveAs(path); paths.Add(path); } } string poj = System.IO.File.ReadAllText(paths[0]); // Cofnięcie o 1 folder w drzewku // wczytanie z pliku tekstowego wartosci dla poprzednikow string poj1 = System.IO.File.ReadAllText(paths[1]); // wczytanie z pliku tekstowego zadan dla odp pojec string zad = System.IO.File.ReadAllText(paths[2]); _graphManager.AddGraphFromFiles(name, paths[0], paths[1], paths[2]); return(RedirectToAction("Index", "Home")); }