diff --git a/packages/nocodb/src/models/PresignedUrl.ts b/packages/nocodb/src/models/PresignedUrl.ts index cb10d70373..f8d512f907 100644 --- a/packages/nocodb/src/models/PresignedUrl.ts +++ b/packages/nocodb/src/models/PresignedUrl.ts @@ -99,9 +99,9 @@ export default class PresignedUrl { ) { const isUrl = /^https?:\/\//i.test(param.pathOrUrl); - let path = isUrl - ? decodeURI(new URL(param.pathOrUrl).pathname) - : param.pathOrUrl.replace(/^\/+/, ''); + let path = ( + isUrl ? decodeURI(new URL(param.pathOrUrl).pathname) : param.pathOrUrl + ).replace(/^\/+/, ''); const { expireSeconds = DEFAULT_EXPIRE_SECONDS,