From 641d46dde28161c372228fd222480dffeb8333a3 Mon Sep 17 00:00:00 2001 From: Methapon2001 <61303214+Methapon2001@users.noreply.github.com> Date: Thu, 7 Dec 2023 10:56:40 +0700 Subject: [PATCH] fix: trim whitespaces --- Services/server/src/utils/minio.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Services/server/src/utils/minio.ts b/Services/server/src/utils/minio.ts index 4dc5b18..6c35fc5 100644 --- a/Services/server/src/utils/minio.ts +++ b/Services/server/src/utils/minio.ts @@ -9,7 +9,7 @@ import minioClient from "../minio"; * @returns illegal character replaced path */ export function replaceIllegalChars(path: string, replace = "-") { - return path.replace(/[/\\?%*:|"<>#]/g, replace); + return path.replace(/[/\\?%*:|"<>#]/g, replace).trim(); } /**