jquey ajax upload file in asp.net mvc
- by CoffeeCode
i have a file in my view
<form id="upload" enctype="multipart/form-data">
<input type="file" name="fileUpload" id="fileUpload" size="23" /><br />
</form>
and an ajax request
$.ajax({
url: '<%=Url.Action("JsonSave","Survey") %>',
dataType: 'json',
processData: false,
contentType: "multipart/mixed",
data:
{
Id: selectedRow.Id,
Value: 'some date was added by the user here :))'
},
cache: false,
success: function(data) {
}
});
but there is no file in the Request.Files. Whats wrong with the ajax request?