// 文件接口api
import request from './index'
// 上传文件
export function UploadFile(data: FormData) {
  return request({
    url: 'minio/file/upload',
    method: 'post',
    data,
  })
}

// 导出
export function exportFileApi(data: object) {
  return request({
    url: '/meter/file/listExport',
    method: 'post',
    data,
    responseType: 'blob',
  })
}

// 获取图片地址
export function getPhotoUrl(fileName: string) {
  return request({
    url: `/minio/file/url?fileName=${fileName}`,
    method: 'get',
  })
}
