2 actions in one method
Hey there, I am new to C# and ASP.NET, what I am trying to accomplish now is to make account area where person updates details regarding their account. However no luck passing file and some form fields together. Any help, please? Using ASP.NET Core 8 and MVC 5. Thanks in advance.
4 Replies
Well, you have two of the same path
Either make them into one method, or make them different
One being
[HttpPost]
and another [HttpPost("/picture")]
or what have youThen how can I effectively merge them? because if I use both parameters ((FormFile profilePhoto and UserSettingsVM model) it won't work.
Make the
IFormFile
a part of your UserSettingsVM
Thanks a lot!