public JsonResult ImportItems(HttpPostedFileBase file, string database, bool versionChecked) { VerifyImportExportPermissions(); Assert.IsNotNull(file, "File was not provided"); var importService = new ImportService(database, versionChecked); ImportResult importResult = null; try { importResult = importService.ImportCsv(file.InputStream); } catch (Exception ex) { Sitecore.Diagnostics.Log.Error("Failure to import CSV", ex); throw; } return(Json(importResult, JsonRequestBehavior.AllowGet)); }