From bab05fe21e2fcec0b72614ef3cbb5f0da8266d81 Mon Sep 17 00:00:00 2001 From: Jicheng Lu <103353@smsassist.com> Date: Wed, 19 Jun 2024 11:59:31 -0500 Subject: [PATCH 1/3] minor change --- .../BotSharp.Core/Files/BotSharpFileService.Conversation.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Infrastructure/BotSharp.Core/Files/BotSharpFileService.Conversation.cs b/src/Infrastructure/BotSharp.Core/Files/BotSharpFileService.Conversation.cs index 92f4107ec..76eda14dc 100644 --- a/src/Infrastructure/BotSharp.Core/Files/BotSharpFileService.Conversation.cs +++ b/src/Infrastructure/BotSharp.Core/Files/BotSharpFileService.Conversation.cs @@ -1,4 +1,3 @@ -using Amazon.Runtime.Internal.Auth; using BotSharp.Abstraction.Browsing; using BotSharp.Abstraction.Browsing.Models; using Microsoft.EntityFrameworkCore; From a6e5c9342ae5440a55753fcab0f6fda5d26552d5 Mon Sep 17 00:00:00 2001 From: Jicheng Lu <103353@smsassist.com> Date: Wed, 19 Jun 2024 12:29:24 -0500 Subject: [PATCH 2/3] sleep --- .../BotSharp.Core/Files/BotSharpFileService.Conversation.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Infrastructure/BotSharp.Core/Files/BotSharpFileService.Conversation.cs b/src/Infrastructure/BotSharp.Core/Files/BotSharpFileService.Conversation.cs index 76eda14dc..c58300bd9 100644 --- a/src/Infrastructure/BotSharp.Core/Files/BotSharpFileService.Conversation.cs +++ b/src/Infrastructure/BotSharp.Core/Files/BotSharpFileService.Conversation.cs @@ -230,7 +230,8 @@ public bool SaveMessageFiles(string conversationId, string messageId, string sou using var fs = new FileStream(Path.Combine(subDir, file.FileName), FileMode.OpenOrCreate); fs.Write(bytes, 0, bytes.Length); fs.Flush(); - Thread.Sleep(100); + fs.Close(); + Thread.Sleep(2000); } return true; From 716008c685af407ff314891da8409cceae4533e1 Mon Sep 17 00:00:00 2001 From: Jicheng Lu <103353@smsassist.com> Date: Wed, 19 Jun 2024 12:29:47 -0500 Subject: [PATCH 3/3] minor change --- .../BotSharp.Core/Files/BotSharpFileService.Conversation.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Infrastructure/BotSharp.Core/Files/BotSharpFileService.Conversation.cs b/src/Infrastructure/BotSharp.Core/Files/BotSharpFileService.Conversation.cs index c58300bd9..4ded2359c 100644 --- a/src/Infrastructure/BotSharp.Core/Files/BotSharpFileService.Conversation.cs +++ b/src/Infrastructure/BotSharp.Core/Files/BotSharpFileService.Conversation.cs @@ -230,7 +230,6 @@ public bool SaveMessageFiles(string conversationId, string messageId, string sou using var fs = new FileStream(Path.Combine(subDir, file.FileName), FileMode.OpenOrCreate); fs.Write(bytes, 0, bytes.Length); fs.Flush(); - fs.Close(); Thread.Sleep(2000); }