Receive file and other form data together in ASP.NET Core Web API (boundary based request parsing)
<p>How would you form your parameters for the action method which is supposed to receive one <code>file</code> and one <code>text</code> value from the request?</p>

<p>I tried this</p>

<pre><code>public string Post([FromBody]string name, [FromBody]IFormFile imageFile)
</code></pre>

<p>And tried hitting it from Postman but it gives me <code>500 Internal Server Error</code>. I also can't debug it because it never hits the first statement inside the action method where I've put my breakpoint.</p>

<p>Any idea how can we parse boundary based requests and extract file(s) and other textual field(s)? I am new to ASP.NET Core.</p>