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, '_')); +}