Browse Source

fix: remove extra slash from path (#9066)

Co-authored-by: mertmit <mertmit99@gmail.com>
pull/9067/head
Anbarasu 4 months ago committed by GitHub
parent
commit
077816fe27
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 6
      packages/nocodb/src/models/PresignedUrl.ts

6
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,

Loading…
Cancel
Save