I have an requirement like posting an xml file into the controller using WebApi
curl --form "file=@update.xml"
curl --form "file=update.xml" "http://localhost:60794/WebApi/Forms/Update?login=logger"
[AllowAnonymous]
public virtual ActionResult Update(string login)
{
new HomeController().SetLoggedIn("logger");
HttpPostedFileBase file = Request.Files["file"];
StreamReader fileStream = new StreamReader(file.InputStream);
If am trying to use the given path by the dev its is not working like below
curl --form "file=@D:/update.xml" "http://localhost:60794/WebApi/Forms/Update?login=logger"
How to post the local xml file and do this operation?