summaryrefslogtreecommitdiff
path: root/lib/tech-vendors/table
diff options
context:
space:
mode:
authorjoonhoekim <26rote@gmail.com>2025-09-09 10:40:51 +0000
committerjoonhoekim <26rote@gmail.com>2025-09-09 10:40:51 +0000
commit085aae795bd0fb20dca7a8a113fd91f483661617 (patch)
treef43c403d816a1ad32718d20d8fb81ba93c8c8f6d /lib/tech-vendors/table
parentcaa01b321311de3983fb8bcf65bb20a6c047cf57 (diff)
(김준회) 기술영업 첨부파일 다운로드 관련 오류 수정
Diffstat (limited to 'lib/tech-vendors/table')
-rw-r--r--lib/tech-vendors/table/attachmentButton.tsx7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/tech-vendors/table/attachmentButton.tsx b/lib/tech-vendors/table/attachmentButton.tsx
index 2754c9f0..d1d50047 100644
--- a/lib/tech-vendors/table/attachmentButton.tsx
+++ b/lib/tech-vendors/table/attachmentButton.tsx
@@ -35,9 +35,14 @@ export function AttachmentsButton({ vendorId, hasAttachments, attachmentsList =
// 파일 다운로드 트리거
toast.success('첨부파일 다운로드가 시작되었습니다.');
+ // 서버 액션에서 상대 URL을 반환하므로 절대 URL로 변환
+ const downloadUrl = result.isServerAction
+ ? `${window.location.origin}${result.url}`
+ : result.url;
+
// 다운로드 링크 열기
const a = document.createElement('a');
- a.href = result.url;
+ a.href = downloadUrl;
a.download = result.fileName || '첨부파일.zip';
a.style.display = 'none';
document.body.appendChild(a);