From 508d20084aa6c20a14033f2d6844f3e4f1aadc3f Mon Sep 17 00:00:00 2001 From: Haiping Chen Date: Fri, 19 Sep 2025 21:05:48 -0500 Subject: [PATCH] Return json format for UploadConversationMessageFiles --- .../BotSharp.OpenAPI/Controllers/ConversationController.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Infrastructure/BotSharp.OpenAPI/Controllers/ConversationController.cs b/src/Infrastructure/BotSharp.OpenAPI/Controllers/ConversationController.cs index 76425dfe..e45a29de 100644 --- a/src/Infrastructure/BotSharp.OpenAPI/Controllers/ConversationController.cs +++ b/src/Infrastructure/BotSharp.OpenAPI/Controllers/ConversationController.cs @@ -483,7 +483,7 @@ public class ConversationController : ControllerBase } [HttpPost("/agent/{agentId}/conversation/{conversationId}/upload")] - public async Task UploadConversationMessageFiles([FromRoute] string agentId, [FromRoute] string conversationId, [FromBody] InputMessageFiles input) + public async Task UploadConversationMessageFiles([FromRoute] string agentId, [FromRoute] string conversationId, [FromBody] InputMessageFiles input) { var convService = _services.GetRequiredService(); convService.SetConversationId(conversationId, input.States); @@ -491,7 +491,7 @@ public class ConversationController : ControllerBase var fileStorage = _services.GetRequiredService(); var messageId = Guid.NewGuid().ToString(); var isSaved = fileStorage.SaveMessageFiles(conv.Id, messageId, FileSource.User, input.Files); - return isSaved ? messageId : string.Empty; + return Ok(new { messageId = isSaved ? messageId : string.Empty }); } [HttpGet("/conversation/{conversationId}/files/{messageId}/{source}")]