How to post file using Curl in WebApi in Asp.Net MVC
<p>I have an requirement like posting an xml file into the controller using WebApi</p>

<blockquote>
  <p>curl --form "file=@update.xml" </p>
  
  <p>curl --form "file=update.xml" "<a href="http://localhost:60794/WebApi/Forms/Update?login=logger" rel="nofollow">http://localhost:60794/WebApi/Forms/Update?login=logger</a>"</p>
</blockquote>

<pre><code>[AllowAnonymous]
public virtual ActionResult Update(string login)
{
    new HomeController().SetLoggedIn("logger");
    HttpPostedFileBase file = Request.Files["file"];
    StreamReader fileStream = new StreamReader(file.InputStream);
</code></pre>

<p>If am trying to use the given path by the dev its is not working like below</p>

<blockquote>
  <p>curl --form "file=@D:/update.xml" "<a href="http://localhost:60794/WebApi/Forms/Update?login=logger" rel="nofollow">http://localhost:60794/WebApi/Forms/Update?login=logger</a>" </p>
</blockquote>

<p>How to post the local xml file and do this operation?</p>