From c36ba1584a5ecd6512e261533610e0442a71f751 Mon Sep 17 00:00:00 2001 From: Alexey Bannov Date: Mon, 12 Dec 2022 19:58:21 +0300 Subject: [PATCH] fixed upload room logo to s3 --- .../Core/Core/VirtualRooms/RoomLogoManager.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/products/ASC.Files/Core/Core/VirtualRooms/RoomLogoManager.cs b/products/ASC.Files/Core/Core/VirtualRooms/RoomLogoManager.cs index b1d3a4aa9d..14dd288703 100644 --- a/products/ASC.Files/Core/Core/VirtualRooms/RoomLogoManager.cs +++ b/products/ASC.Files/Core/Core/VirtualRooms/RoomLogoManager.cs @@ -175,7 +175,16 @@ public class RoomLogoManager using var stream = new MemoryStream(data); var path = await DataStore.SaveAsync(TempDomainPath, fileName, stream); - return path.ToString(); + var pathAsString = path.ToString(); + + var pathWithoutQuery = pathAsString; + + if (pathAsString.IndexOf('?') > 0) + { + pathWithoutQuery = pathAsString.Substring(0, pathAsString.IndexOf('?')); + } + + return pathWithoutQuery; } public async Task SaveWithProcessAsync(T id, byte[] imageData, long maxFileSize, Point position, Size cropSize)