fetch 파일다운로드


fetch 파일다운로드

/* 자바 스크립트 */ function fileDownLoad(fileName,finalFileName,path){ const paramData = { method: 'POST', body: JSON.stringify({ fileName, finalFileName,path }), headers: { 'Content-Type': 'application/json' } }; fetch('/logFarm/downloadFetchFiles.json',paramData) .then(res => res.blob()) .then(data => { const a = document.createElement("a"); a.href = window.URL.createObjectURL(data); a.download = f..


원문링크 : fetch 파일다운로드