From c1f8bc13560488bf3abe1724cb0f0af9da06961b Mon Sep 17 00:00:00 2001 From: Pranav C Date: Tue, 11 Apr 2023 11:46:37 +0530 Subject: [PATCH] refactor: revert #f3b5bedb17929b44f70cc7a68f4799fe07208cde Signed-off-by: Pranav C --- packages/nocodb/src/lib/services/attachment.svc.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/nocodb/src/lib/services/attachment.svc.ts b/packages/nocodb/src/lib/services/attachment.svc.ts index 188aa11c37..75e349b3bc 100644 --- a/packages/nocodb/src/lib/services/attachment.svc.ts +++ b/packages/nocodb/src/lib/services/attachment.svc.ts @@ -112,3 +112,7 @@ export async function fileRead(param: { path: string }) { const img = await storageAdapter.fileRead(slash(param.path)); return { img, type }; } + +export function sanitizeUrlPath(paths) { + return paths.map((url) => url.replace(/[/.?#]+/g, '_')); +}