Browse Source

fix: s3 attachment path

Signed-off-by: mertmit <mertmit99@gmail.com>
pull/6615/head
mertmit 11 months ago
parent
commit
d74b9a46c1
  1. 5
      packages/nocodb/src/db/BaseModelSqlv2.ts
  2. 4
      packages/nocodb/src/services/attachments.service.ts

5
packages/nocodb/src/db/BaseModelSqlv2.ts

@ -4073,8 +4073,9 @@ class BaseModelSqlv2 {
);
} else if (attachment?.url) {
if (attachment.url.includes('.amazonaws.com/')) {
const relativePath =
attachment.url.split('.amazonaws.com/')[1];
const relativePath = decodeURI(
attachment.url.split('.amazonaws.com/')[1],
);
promises.push(
PresignedUrl.getSignedUrl({
path: relativePath,

4
packages/nocodb/src/services/attachments.service.ts

@ -67,7 +67,9 @@ export class AttachmentsService {
);
} else {
if (attachment.url.includes('.amazonaws.com/')) {
const relativePath = attachment.url.split('.amazonaws.com/')[1];
const relativePath = decodeURI(
attachment.url.split('.amazonaws.com/')[1],
);
promises.push(
PresignedUrl.getSignedUrl({
path: relativePath,

Loading…
Cancel
Save