title: ASP.NET Core Web API - Get file along with [FromBody] JSON model
body: <p>I have an existing API endpoint that receives data from a the client. I want to add the ability to receive files on that endpoint along with the data. This is my model:</p>
  <pre><code>public class TestModel
  {
      public IList&lt;IFormFile&gt; File { get; set; }
      public string Name { get; set; }
      public int Age { get; set; }
      public string Hobbies { get; set; }
  }
  </code></pre>
  <p>And this is my endpoint:</p>
  <pre><code>[HttpPost]
  [Route(&quot;upload&quot;)]
  public async Task&lt;ActionResult&gt; UploadTest([FromBody] TestModel test)
  {
      return Ok();
  }
  </code></pre>
  <p>I'm currently testing my API with Postman. I know that in Postman there is an option to send files with <code>form-data</code> as the body, but in such case my client would need to use <code>form-data</code> and I with to use json as data (using <code>FromBody</code>).</p>
  <p>I can't find a way how to do that - is it possible? And if so, how do I use Postman to send the file view <code>raw</code> json?</p>