하수 재이용 등록 작업 완료

This commit is contained in:
leedj312
2025-06-02 16:23:08 +09:00
parent 67400409fc
commit 72585f9d91
8 changed files with 155 additions and 68 deletions
+1 -5
View File
@@ -35,11 +35,7 @@ export const getFetch = async (type: string, url: string) => {
const blob = await response.blob();
const blobUrl = window.URL.createObjectURL(blob);
const a = document.createElement("a");
// 파일명 추출 (서버에서 header에 Content-Disposition을 보낼 경우 활용)
const disposition = response.headers.get("Content-Disposition");
const match = disposition?.match(/filename="?(.+)"?/);
const filename = match?.[1] || "downloaded_file";
const filename = "downloaded_file.PDF";
a.href = blobUrl;
a.download = filename;