public IActionResult Upload() { PluginPackage package = new PluginPackage(Request.GetPluginStream(), _dbConnectionFactory); _pluginManager.AddPlugins(package); return(RedirectToAction("Index")); }
public IActionResult Upload() { var package = new PluginPackage(Request.Form.Files.First().OpenReadStream()); _pluginManager.AddPlugins(package); return(RedirectToAction("Index")); }
public IActionResult Install([FromBody] SetupModulesModel model) { if (model != null && model.Modules != null) { foreach (string module in model.Modules) { using (FileStream fs = new FileStream(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, GlobalConst.PresetFolder, module), FileMode.Open)) { _pluginManager.AddPlugins(new Core.DomainModel.PluginPackage(fs, _dbHelper)); } } } _systemManager.MarkAsInstalled(); return(Ok()); }