I'm trying to upload a file via angular.
So far I can select the file and post it from the angular end but I can't get the controller to receive the file.
this is how I post the file:
var f = new FormData();
f.append("file", file);
$http.post("/LoadFile", f);
but I can't seem to get my controller to receive the file. I've tried all the following:
[HttpPost]
public ActionResult Upload(object file)
[HttpPost]
public ActionResult Upload(HttpPostedFileBase file)
[HttpPost]
public ActionResult Upload(HttpRequestMessage request)
[HttpPost]
public ActionResult Upload()
If I add breakpoint to the methods the only one that gets hit is the last one.