public async Task <IActionResult> CreateComposeApp([FromRoute] string name, IFormCollection formData) { var composeFile = formData.Files.FirstOrDefault(f => f.FileName.EndsWith(".yml")); if (composeFile == null) { return(BadRequest()); } var streamContent = new StreamContent(composeFile.OpenReadStream()); var composeFileContent = await streamContent.ReadAsStringAsync(); var composeApplication = new ComposeApplication(name, composeFileContent); await _clusterManager.CreateComposeApp(composeApplication); return(Ok(new { result = $"Application {name} created" })); }