![](/img/trans.png)
[英]Multiple file upload with ASP.NET MVC & jQuery Multiple File Upload Plugin
[英]asp.net mvc jquery form plugin upload(file not recieved by the controller)
我正在使用jquery表单插件进行文件上传。 我无法在控制器中获取文件。 什么可能是错的。
public string CreateOrganizationMeta()
{
foreach (string file in Request.Files)
{
HttpPostedFileBase postedFile = Request.Files[file];
}
}
$(document).ready(function () {
$('#MyForm').ajaxForm({
});
});
<% using (Html.BeginForm("Organization", "CreateOrganizationMeta", FormMethod.Post, new { id = "MyForm", enctype = "multipart/form-data", onsubmit = "return submitForm2(this)" }))
{ %>
<input type="file" name="Logo2" id="Logo2" />
该插件的文档指出它支持文件上传。
我在多个项目上使用过Andrew Valums的Ajax Upload ,它的效果很好。 可以考虑替代。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.