var formData = new FormData();
formData.append('file', $('#myfile')[0].files[0]); // myFile is the input type="file" control
var _url = '@Url.Action("UploadFile", "MyController")';
$.ajax({
url: _url,
type: 'POST',
data: formData,
processData: false, // tell jQuery not to process the data
contentType: false, // tell jQuery not to set contentType
success: function (result) {
},
error: function (jqXHR) {
},
complete: function (jqXHR, status) {
}
});