Kendo upload the HttpPostedFileBase showing always null In IE11

1.5k views Asked by At

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 }
1

There are 1 answers

1
Atanas Korchev On BEST ANSWER

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>