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.') }) }