Пример #1
0
        public async Task <IActionResult> EditProfile()
        {
            S3Helper s3Helper = new S3Helper(_s3Client);

            var user = await _userManager.GetUserAsync(User);

            var img = s3Helper.GetUrl(_imageBucket, "images/" + user.Image);

            ViewBag.Image = img.ToString();

            return(View(new EditProfileViewModel {
                FirstName = user.FirstName,
                LastName = user.LastName,
                Address = user.Address,
                FavoriteBook = user.FavoriteBook,
                Image = user.Image
            }));
        }