From ca9c20bd3715c36f5c32b0294f6a5928de4353e1 Mon Sep 17 00:00:00 2001 From: leeyongjae Date: Thu, 17 Oct 2024 16:39:26 +0900 Subject: [PATCH] =?UTF-8?q?=EC=BB=A4=EB=AE=A4=EB=8B=88=ED=8B=B0=20?= =?UTF-8?q?=ED=8C=8C=EC=9D=BC=20=EB=8B=A4=EC=9A=B4=EB=A1=9C=EB=93=9C=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/util/board-utils.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/util/board-utils.js b/src/util/board-utils.js index a129c4d4..c41ba22a 100644 --- a/src/util/board-utils.js +++ b/src/util/board-utils.js @@ -8,8 +8,10 @@ export const handleFileDown = async (file) => { const params = new URLSearchParams({ encodeFileNo: file.encodeFileNo, }) + const options = { responseType: 'blob' } const apiUrl = `${url}?${params.toString()}` - await promiseGet({ url: apiUrl, responseType: 'blob' }) + + await promiseGet({ url: apiUrl, option: options }) .then((resultData) => { if (resultData) { const blob = new Blob([resultData.data], { type: resultData.headers['content-type'] || 'application/octet-stream' }) @@ -25,7 +27,7 @@ export const handleFileDown = async (file) => { } }) .catch((error) => { - alert(error.response.data.message) + alert('File does not exist.') }) }