I'm trying to upload an image file using ajaxForm(). Somehow the server never gets the request. here's some code:
$('form').ajaxForm({
iframe: true,
type: "POST",
dataType: "json",
url: '/UploadPictureId',
data: {
academicPhotoId: $('#AcademicPhotoId')
},
success: function (result) {
alert("win");
}
});
and here's the method code:
[HttpPost]
public JsonResult UploadPictureId(HttpPostedFileBase AcademicPhotoId)
{
return Json(...);
}
A few things to check: