Kendo 上传在 IE11 中始终显示为 null 的 HttpPostedFileBase
Kendo upload the HttpPostedFileBase showing always null In IE11
我正在使用 kendo 带剔除功能的上传功能。控制器操作结果中的 HttpPostedFileBase 在 IE11、Chrome、Firefox 中始终显示为 null。
但是在IE8、IE9 下运行正常。如果有人能解决这个问题就太好了。
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 }
尝试从 <input type=file>
而不是 <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>
我正在使用 kendo 带剔除功能的上传功能。控制器操作结果中的 HttpPostedFileBase 在 IE11、Chrome、Firefox 中始终显示为 null。 但是在IE8、IE9 下运行正常。如果有人能解决这个问题就太好了。
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 }
尝试从 <input type=file>
而不是 <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>