Пример #1
0
        public ActionResult AddPictureToUser(HttpPostedFileBase fileUpload)
        {
            FungeyeDAL DAL = new FungeyeDAL();

            if (fileUpload == null)
            {
                ViewBag.ErrorMessage = "We were unable to upload your image. Please try again.";
                return(View("UploadUserImage"));
            }

            DAL.UpdateUserPic(fileUpload, User.Identity.GetUserId());

            return(RedirectToAction("GetUserInfo", new { id = User.Identity.GetUserId() }));
        }