If I change the this.submit function in my knockout viewmodel to the code below it works as it should but i want to use amplify to get this.
this.submit = function (model, element) {
var test = $('#uploadForm')[0];
var formURL = formObj.attr("action");
var formData = new FormData(test);
$.ajax({
url: formURL,
type: 'POST',
data: formData,
mimeType: "multipart/form-data",
contentType: false,
cache: false,
processData: false,
success: function (data, textStatus, jqXHR) {
},
error: function (jqXHR, textStatus, errorThrown) {
}
});
};
and of course in my controller method I should return:
return Json(model.BetFiles);
Instead of a View.