public ActionResult UploadUpdatedTalent() { client = new FireSharp.FirebaseClient(config); string link = HttpContext.Session.GetString("UploadedLink"); string id = HttpContext.Session.GetString("TalentsID"); string code = HttpContext.Session.GetString("UpdateCode"); talentsList T = new talentsList(); T.imagelink = link; T.TalentId = int.Parse(id); T.TalentCode = code; var data = T; SetResponse response = client.Set("Talents/" + code, data); return(Redirect("http://18.139.166.95/CSC_Ben")); }
public ActionResult UploadToFirebase() { client = new FireSharp.FirebaseClient(config); string link = HttpContext.Session.GetString("UploadedLink"); string id = HttpContext.Session.GetString("TalentsID"); talentsList T = new talentsList(); T.imagelink = link; T.TalentId = int.Parse(id) + 1; var data = T; PushResponse response = client.Push("Talents/", data); data.TalentCode = response.Result.name; SetResponse response3 = client.Set("Talents/" + data.TalentCode, data); SetResponse response1 = client.Set("talentsID", int.Parse(id) + 1); return(Redirect("http://18.139.166.95/CSC_Ben")); }