Apr 01, 2014, 6:53 PM
[CLOSED] MultiUpload MVC response error in IE 11
I have implemented the multipupload control on an MVC page. The control is posting to my controller, and the files are being successfully sent to my database via a WCF service method. The page works fine in Firefox and Chrome, but in IE 11 (and also IE 10 emulation), a response error message is thrown. I have used the F12 tools and VS debugging, but cannot find where the response message comes from or why.
I am supplying the code and screen shot. In the screen shot, you will notice two response errors - one for each of the files uploaded. Any idea what could be happening?
I am supplying the code and screen shot. In the screen shot, you will notice two response errors - one for each of the files uploaded. Any idea what could be happening?
Html.X().MultiUpload()
.ID("MultiUpload1")
.FileDropAnywhere(true)
.FileSizeLimit("15 MB")
.FileTypes("*.*")
.FileTypesDescription("All Files")
.FileUploadLimit(20)
.FileQueueLimit(0)
.UploadUrl(Url.Action("MultiUpload", "Distribution", new { area = "Report", id = Model.GeneratedDistributionId }))
.Listeners(l =>
{
l.SwfUploadLoadFailed.Fn = "loadFailed";
l.FileSelected.Fn = "fileSelected";
l.FileSelectionError.Fn = "fileSelectionError";
l.UploadStart.Handler = "updateRecord(file.id, 'status', 'Sending');";
l.UploadProgress.Handler = "updateRecord(file.id, 'progress', Math.round(bytesComplete / bytesTotal));";
l.UploadComplete.Handler = "updateRecord(file.id, 'progress', 1); updateRecord(file.id, 'status', 'Uploaded');";
l.UploadAborted.Handler = "updateRecord(file.id, 'status', 'Aborted');";
l.UploadRemoved.Handler = "var store = this.up('grid').store; store.remove(store.getById(file.id));";
l.UploadError.Fn = "uploadError";
}),
Html.X().ToolbarSeparator(),
Html.X().Button()
.Text("Start Upload")
.Icon(Icon.PageGo)
.Handler("#{MultiUpload1}.startUpload();"),
Html.X().Button()
.Text("Abort")
.Icon(Icon.PageCancel)
.Handler("abortUpload"),
Html.X().Button()
.Text("Abort All")
.Icon(Icon.PageCancel)
.Handler("#{MultiUpload1}.abortAllUploads();"),
Html.X().Button()
.Text("Remove")
.Icon(Icon.PageDelete)
.Handler("removeUpload"),
Html.X().Button()
.Text("Remove All")
.Icon(Icon.PageDelete)
.Handler("#{MultiUpload1}.removeAllUploads(); selectedFiles = new Array();")
[HttpPost]
public ActionResult MultiUpload(int id, FileUploadEventArgs e)
{
if (e.HasFile)
{
HttpPostedFile file = e.PostedFile;
Logger.LogMessage(String.Format("Adding attachment '{0}' for GeneratedDistributionId {1}", file.FileName, id));
var svc = ReportService;
bool isNewAttachment = svc.AddGeneratedDistributionAttachment(id, file.FileName, file.ContentType, file.InputStream.ToByteArray(), User.Identity.Name);
}
else
{
Logger.LogMessage("No file present in upload.");
}
return this.Direct();
}
Last edited by Daniil; Sep 27, 2014 at 7:56 AM.
Reason: [CLOSED]