Skip to content

πŸ”₯ πŸ”₯ πŸ”₯ A Free & Self-hostable Airtable Alternative

prevent undefined from path join

Fendy Heryantof8df3cdaa87d
diff --git a/packages/nocodb/src/services/v3/data-attachment-v3.service.ts b/packages/nocodb/src/services/v3/data-attachment-v3.service.ts
index 2e4f0c869f..8e6682b8d5 100644
--- a/packages/nocodb/src/services/v3/data-attachment-v3.service.ts
+++ b/packages/nocodb/src/services/v3/data-attachment-v3.service.ts
@@ -226,10 +226,9 @@ export class DataAttachmentV3Service {
)}${path.extname(filename)}`;
const filePath = path.join(
- context.workspace_id,
- context.base_id,
- modelId,
- column.id,
+ ...[context.workspace_id, context.base_id, modelId, column.id].filter(
+ (k) => k,
+ ),
);
const destPath = path.join('nc', scope ?? 'uploads', filePath);