public ActionResult Index() { string identificateur = User.Identity.GetUserId(); photo = new Photo(); Session["image"] = photo.GetCurrentPhoto(identificateur); return View(); }
public FileContentResult getImg(int newWidth, int newHeight) { string identificateur = User.Identity.GetUserId(); photo = new Photo(); byte[] byteArray = photo.GetCurrentPhoto(identificateur); return byteArray != null ? new FileContentResult(ResizeImage(byteArray, newWidth, newHeight), "image/jpeg") : null; }