import request from '@/utils/request'

export function downloadFileByPath(path) {
  return request({
    url: '/upload/downloadFile',
    method: 'get',
    params: {path},
    responseType: 'blob'
  })
}

export function  downloadPDF(params){
  return request({
    url: '/upload/downloadPDF',
    method: 'get',
    params,
    responseType: 'blob'
  })
}

export function  saveFile(uploadDto){
  return request({
    url: '/upload/saveFile',
    method: 'post',
    data: uploadDto
  })
}


export function indexUploadFile(uploadDto) {
  return request({
    url: '/upload/updateAttachmentsBatch',
    method: 'post',
    data: uploadDto
  })
}


