[React, Spring Boot] 파일 다운로드(Blob)
파일 다운로드 : DB에 있는 원본 BLOB 데이터를 가져와 화면에서 다운로드 React const downloadFile = async (event, doc) => { event.preventDefault(); const downloadUrl = '다운로드 url' const result = await axios.get(downloadUrl, {responseType : 'blob'}) // responseType 중요 let blob = new Blob([result.data], { type: result.headers['content-type'] }) let link = document.createElement('a') link.href = window.URL.createObjectURL(blob)..