I am trying to upload a file with ASP.NET MVC.
The following code work perfectly fine:
// Read in the image data.
byte[] binaryData = null;
HttpPostedFil
No bloody way :(
I figured out that answer and it's pretty lame.
I had to have the argument NAME being identical to the Id/Name values of the input type="file" element!!! (not sure if it's either or both element values ... i didn't check that bit out).
so this is the answer.
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Create([Bind(Include = "Subject, Content")]Post post,
HttpPostedFileBase imageFileName)
{
...
}
shees!