79664540

Date: 2025-06-13 08:22:28
Score: 1.5
Natty:
Report link

A somewhat late answer, in addition to @Ruikai Feng's answer, if your UI (Swagger, Scalar, or other) doesn't display the correct Content-Type, you can specify it like this in your controller at your endpoint:

[Consumes("multipart/form-data")]  // 👈 Add it like this
[HttpPost("register"), DisableRequestSizeLimit]
public IActionResult RegisterUser([FromForm] RegisterModel registermodel)
{
    return StatusCode(200);
}
Reasons:
  • Has code block (-0.5):
  • User mentioned (1): @Ruikai
  • Low reputation (1):
Posted by: Benito