title: Bad Request (400) when posting IFormFile
body: <p>I have a .NET Core API project that has a simple endpoint to upload a file:</p>
  <pre><code>[Route(&quot;api/[controller]&quot;)]
  [ApiController]
  public class FilesController : Controller
  {
      private IFilesService _filesService { get; set; }
  
      public FilesController(IFilesService filesService)
      {
          _filesService = filesService;
      }
  
      [HttpPost]
      public async Task&lt;IActionResult&gt; UploadFile(IFormFile file)
      {
          var model = await _filesService.UploadFile(file);
          return Ok();
      }
  }
  </code></pre>
  <p>I've tried to test this using Postman, but each time I post a file to the endpoint, I get a 400 Bad Request error. My endpoint never gets hit.</p>
  <p>I have several other POST endpoints that work just fine, so it's an issue either with this specific endpoint or with Postman. Here is my setup in Postman:</p>
  <p><a href="https://i.stack.imgur.com/BEh2h.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/BEh2h.png" alt="enter image description here" /></a></p>
  <p>I've been spinning my wheels trying to figure out what the issue is, but there's not much to this at all, and I'm following examples I've seen online.</p>
  <p>What am I doing wrong?</p>