견적서 첨부파일 다운로드
This commit is contained in:
parent
c3f03d86c2
commit
045aa23af1
@ -108,8 +108,6 @@ export const useEstimateController = (planNo) => {
|
||||
const handleEstimateFileDownload = async (originFile) => {
|
||||
const options = { responseType: 'blob' }
|
||||
|
||||
console.log('첨부파일 다운로드 호출:::::::', originFile)
|
||||
|
||||
await promisePost({ url: `/api/file/fileDownload`, data: originFile, option: options })
|
||||
.then((resultData) => {
|
||||
if (resultData) {
|
||||
@ -118,7 +116,7 @@ export const useEstimateController = (planNo) => {
|
||||
const link = document.createElement('a')
|
||||
|
||||
link.href = fileUrl
|
||||
link.download = file.srcFileNm
|
||||
link.download = originFile.faileName
|
||||
document.body.appendChild(link)
|
||||
link.click()
|
||||
link.remove()
|
||||
@ -126,6 +124,7 @@ export const useEstimateController = (planNo) => {
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log('::FileDownLoad Error::', error)
|
||||
alert('File does not exist.')
|
||||
})
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user