diff options
| author | joonhoekim <26rote@gmail.com> | 2025-09-09 03:19:41 +0000 |
|---|---|---|
| committer | joonhoekim <26rote@gmail.com> | 2025-09-09 03:19:41 +0000 |
| commit | e06913008f124ce8e7389fbdc1e57206ce9bbb2b (patch) | |
| tree | 010292c2cd6116065d70893055deba230899d4ca /lib/vendors/table/attachmentButton.tsx | |
| parent | 61fd1ff7162390f9ec2480da74840e58bb0b6ebd (diff) | |
(김준회) 협력업체관리 업체분류, 정규업체등록현황 부 수정, 파일다운로드 오류 수정, 업데이트 시트 수정
Diffstat (limited to 'lib/vendors/table/attachmentButton.tsx')
| -rw-r--r-- | lib/vendors/table/attachmentButton.tsx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/vendors/table/attachmentButton.tsx b/lib/vendors/table/attachmentButton.tsx index 3ffa9c5f..86cf992b 100644 --- a/lib/vendors/table/attachmentButton.tsx +++ b/lib/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); |
