summaryrefslogtreecommitdiff
path: root/app/api/projects
diff options
context:
space:
mode:
authorjoonhoekim <26rote@gmail.com>2025-11-03 19:50:47 +0900
committerjoonhoekim <26rote@gmail.com>2025-11-03 19:50:47 +0900
commitfd9ffaaa01d79910f82c7c821b03966afed5f939 (patch)
treea0562482a572d309de330b4658e7fa29030d1a57 /app/api/projects
parent16dcdfe67bd7488a9b2ee1e0389602ec9dd7976b (diff)
(김준회) swp: 커버페이지 pdf로 확장자 변경, 생성 로직 최적화 (임시파일 로직 제거, 메모리에서 버퍼 직접 사용)
Diffstat (limited to 'app/api/projects')
-rw-r--r--app/api/projects/[projectId]/cover/route.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/api/projects/[projectId]/cover/route.ts b/app/api/projects/[projectId]/cover/route.ts
index 802e2ab6..f4038d43 100644
--- a/app/api/projects/[projectId]/cover/route.ts
+++ b/app/api/projects/[projectId]/cover/route.ts
@@ -51,15 +51,15 @@ export async function GET(
)
}
- // DOCX 파일로 응답
+ // PDF 파일로 응답
// Buffer를 Uint8Array로 변환
const uint8Array = new Uint8Array(result.buffer)
return new NextResponse(uint8Array, {
status: 200,
headers: {
- "Content-Type": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
- "Content-Disposition": `attachment; filename="${encodeURIComponent(result.fileName || "cover.docx")}"`,
+ "Content-Type": "application/pdf",
+ "Content-Disposition": `attachment; filename="${encodeURIComponent(result.fileName || "cover.pdf")}"`,
"Content-Length": result.buffer.length.toString(),
},
})