2

I'm using jquery file upload plugin per blueimp and IE9 is not allowing multiple file selection per the following code (below) or the demo:

http://blueimp.github.com/jQuery-File-Upload/

Can somebody provide a workaround or insight?

View:

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script src="@Url.Content("~/Scripts/jquery.ui.widget.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.iframe-transport.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.fileupload.js")" type="text/javascript"></script>

<input id="fileupload" type="file" name="files" multiple="multiple"/>

Controller:

public class HomeController : Controller
{
    public ActionResult Index()
    {
        return View();
    }

    [HttpPost]
    public ActionResult Index(IEnumerable<HttpPostedFileBase> files)
    {
        foreach (var file in files)
        {
            var filename = Path.Combine(Server.MapPath("~/App_Data"), file.FileName);
            file.SaveAs(filename);
        }
        return View();
    }
}
4

1 回答 1

0

对于 Internet Explorer,您需要一个 flash 后备,plupload 可以做到这一点。

于 2012-04-20T21:40:24.820 回答