title: How to upload image with form body and iformfile in net core web api, and copy it to server folder
body: <p>I want to upload image to web api and submit data in one time, but it return me 415 code error </p>
  
  <p>i have try to change it to fromForm but it not working to</p>
  
  <pre><code>[HttpPost("Vendor")]
   public IActionResult NewAdds([FromBody] Ads add, IFormFile file)
   {
     //copy file first then insert
              if (file.Length &gt; 0)
              {}
  }
  </code></pre>
  
  <p>it returns 415. Here result on postman</p>
  
  <pre><code>{
      "type": "https://tools.ietf.org/html/rfc7231#section-6.5.13",
      "title": "Unsupported Media Type",
      "status": 415,
      "traceId": "80000041-0003-ff00-b63f-84710c7967bb"
  }
  </code></pre>