I am trying to use the Kendo UI loading (MVC shell) in asynchronous mode. Everything works fine in Chrome, but in IE there is no such luck (at the moment it is only tested in IE 9). When it initiates the download, I see that it strikes my action method, and the request contains the data that I expect, but nothing is actually saved.
Code examples below:
_EditForm.cshtml (where loaded)
@(Html.Kendo().Upload() .Name(string.Format("upload{0}", "background")) .Multiple(true) .Events(evt => evt.Success("refreshBackgroundImages")) .Messages(msg => msg.DropFilesHere("drag and drop images from your computer here") .StatusUploaded("Files have been uploaded")) .Async(a => a.AutoUpload(true) .SaveField("files") .Save("UploadImage", "Packages", new { siteId = Model.WebsiteId, type = "background" })))
ActionMethod Controller
[HttpPost] public ActionResult UploadImage(IEnumerable<HttpPostedFileBase> files, Guid siteId, string type) { var site = _websiteService.GetWebsite(siteId); var path = Path.Combine(_fileSystem.OutletVirtualPath, site.Outlet.AssetBaseFolder); if (type == "background") { path = Path.Combine(path, _backgroundImageFolder); } else if (type == "image") { path = Path.Combine(path, _foregroundImageFolder); } foreach (var file in files) { _fileSystem.SaveFile(path, file.FileName, file.InputStream, file.ContentType, true); }
asp.net-mvc asp.net-mvc-4 kendo-ui kendo-asp.net-mvc asyncfileupload
Matt millican
source share