diff --git a/apps/server/src/services/export/zip.ts b/apps/server/src/services/export/zip.ts index a487d0b7f..9bfdae5c1 100644 --- a/apps/server/src/services/export/zip.ts +++ b/apps/server/src/services/export/zip.ts @@ -75,6 +75,9 @@ async function exportToZip(taskContext: TaskContext, branch: BBranch, format: "h function getDataFileName(type: string | null, mime: string, baseFileName: string, existingFileNames: Record): string { let fileName = baseFileName.trim(); + if (!fileName) { + fileName = "note"; + } // Crop fileName to avoid its length exceeding 30 and prevent cutting into the extension. if (fileName.length > 30) {