From 53091069b70e2720aedef9f6eb70c092aeb602fe Mon Sep 17 00:00:00 2001 From: Cob-AI Date: Wed, 13 May 2026 23:16:30 -0400 Subject: [PATCH] Fix content-disposition v2 import --- server/src/routes/attachments.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/server/src/routes/attachments.ts b/server/src/routes/attachments.ts index f5f867c0..a04b8222 100644 --- a/server/src/routes/attachments.ts +++ b/server/src/routes/attachments.ts @@ -2,7 +2,7 @@ import { Router, Request, Response } from 'express'; import type { Router as RouterType } from 'express'; import multer from 'multer'; import { basename } from 'node:path'; -import { create as contentDisposition } from 'content-disposition'; +import * as contentDisposition from 'content-disposition'; import { getTaskService } from '../services/task-service.js'; import { getAttachmentService } from '../services/attachment-service.js'; import { getTextExtractionService } from '../services/text-extraction-service.js'; @@ -163,7 +163,10 @@ router.get( const downloadName = basename(attachment.originalName.replace(/\\/g, '/')); res.setHeader('Content-Type', attachment.mimeType); - res.setHeader('Content-Disposition', contentDisposition(downloadName, { type: 'attachment' })); + res.setHeader( + 'Content-Disposition', + contentDisposition.create(downloadName, { type: 'attachment' }) + ); res.sendFile(filepath); }) );