none
How to update Profile picture using Asp.net C# Web Api + ionic 4 RRS feed

  • Question


  • i'm using .net web api to update data in ionic 4. 

    so i'm using this code for updating data and i don't know how to write code for updating profile image for web api i tried different logics and codes but it didn't worked.

    so someone provide me the same.

    Below code is for updating profile data without image, so what should i write for updating profile images.?

    //---------------------------------------------------------------------------------------------------------------------

    [Route("api/User/UpdateData")]
    [HttpPost]
    [AllowAnonymous]

    public IdentityResult UpdateData(AccountModel model)
    {  
          var manager = new UserManager<ApplicationUser>(new UserStore<ApplicationUser>(new ApplicationDbContext()));
          var user = manager.FindByEmail(model.Email);
           if (user != null)
          {
             user.FirstName = model.FirstName;
             user.LastName = model.LastName;
             user.MobileNo = model.MobileNo;
           }
           else {
                }
            IdentityResult result = manager.Update(user);
                return result;
    }

    //---------------------------------------------------------------------------------------------------------------------



    • Edited by ANKURSINH Monday, February 24, 2020 6:12 AM
    • Moved by CoolDadTx Monday, February 24, 2020 3:00 PM ASP.NET related
    Monday, February 24, 2020 6:11 AM

All replies

  • WebAPI has a forum in ASP.NET forums.

    http://forums.asp.net/

    Monday, February 24, 2020 7:16 AM
  • Thank you for your reply.!

    I didn't find solution for my problem.

    Will you be able to provide me a exact link or any tutorial or an example that can directly help with my edit profile module.

    Or will you be able to provide code related to my written code.?

    It would be appreciated if you can help me, Thanks  in advance.

    Tuesday, February 25, 2020 6:21 AM