public async Task <IActionResult> AddNewPost()
        {
            AppUser user = await userManager.GetUserAsync(User);

            IFormFile file        = HttpContext.Request.Form.Files.First();
            string    type        = file.ContentType;
            int       contentSize = 5 * 1024 * 1024;

            if ((type == "image/jpeg" || type == "image/gif" || type == "image/png") && file.Length <= contentSize)
            {
                Image  image    = Image.FromStream(file.OpenReadStream(), true, false);
                string imageExt = Path.GetExtension(file.FileName);
                await profileService.AddNewPost(user, image, imageExt);
            }

            return(Redirect("/" + user.Alias));
        }