How do I get jQuery’s Uploadify plugin to work with ASP.NET MVC?

public string Upload(HttpPostedFileBase FileData) {}

is correct – the file uploaded by uploadify will get binded to FileData. No need to get into Request.Files to retrieve the file – which makes it harder to mock and test.

If your action isn’t firing at all (i.e. try debugging and see if a breakpoint within the method is hit), then your issue is most likely the ‘script’ value – are you running under a virtual directory? If so you’ll need to put the name of the directory in front. Uploadify is using an absolute path.

i.e. ‘script: ‘/virtual_directory/Placement/Upload’

right now uploadify is sending to http://localhost/Placement/Upload.

also try using the route debugger (http://haacked.com/archive/2008/03/13/url-routing-debugger.aspx) to check where your route is being mapped to.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)