public PackageInstallModel InstallData(PackageInstallModel model)
        {
            var ins = new global::Umbraco.Web._Legacy.Packager.Installer(Security.CurrentUser.Id);

            ins.LoadConfig(IOHelper.MapPath(model.TemporaryDirectoryPath));
            ins.InstallBusinessLogic(model.Id, IOHelper.MapPath(model.TemporaryDirectoryPath));
            return(model);
        }
Пример #2
0
        public HttpResponseMessage InstallBusinessLogic(InstallPackageModel model)
        {
            model.PackageFile = HttpUtility.UrlDecode(model.PackageFile);
            var installer = new global::Umbraco.Web._Legacy.Packager.Installer(UmbracoContext.Current.Security.CurrentUser.Id);

            installer.LoadConfig(model.PackageFile);
            installer.InstallBusinessLogic(model.ManifestId, model.PackageFile);
            return(Json(new
            {
                success = true,
                model.ManifestId,
                model.PackageFile,
                percentage = 70,
                message = "Installing starter kit files"
            }, HttpStatusCode.OK));
        }