public ActionResult Rename(int Id, string Name)
 {
     string currentUserId = User.Identity.GetUserId();
     File file = new File();
     var doc = db.Files.Find(Id);
     doc.Name = Name;
     db.Entry(doc).State = EntityState.Modified;
     db.SaveChanges();
     return Json(doc);
 }
 public ActionResult Create(File document)
 {
     string currentUserId = User.Identity.GetUserId();
     document.UserId = currentUserId;
     db.Files.Add(document);
     db.SaveChanges();
     ViewData["Message"] = "success";
     return Json(document);
     //return View(document);
 }