i am using the kendo upload functionality with knockout. The HttpPostedFileBase in the controller action result always show as null in IE11, Chrome, Firefox. But it works fine when using IE8, IE9. It would be great if any one has solution for this issue.
View.cshtml
<form method="post" enctype="multipart/form-data" data-bind="kendoUpload: { async: { saveUrl: 'UploadController/Upload', autoUpload: false }, upload: OnUpload, success: OnSuccess, error: OnError, select: OnSelect, multiple: false }">
<input name="fileUpload" type="file" id="fileUpload" />
</form>
Controller.cs
public virtual ActionResult Upload(HttpPostedFileBase fileUpload) { //Perform some action }
Try creating the upload from the <input type=file>
instead of the <form>
.
<form method="post" enctype="multipart/form-data" >
<input name="fileUpload" type="file" id="fileUpload"
data-bind="kendoUpload: { async: { saveUrl: 'UploadController/Upload', autoUpload: false }, upload: OnUpload, success: OnSuccess, error: OnError, select: OnSelect, multiple: false }" />
</form>