BAOLH
2025-08-25 fca07751d3905b9e67bc20bd83a7893ee3b88137
1
2
3
4
5
6
7
8
9
10
11
import axios from 'axios'
import { getToken } from '@/utils/auth'
 
export function upload(api, file) {
  var data = new FormData()
  data.append('file', file)
  const config = {
    headers: { 'Authorization': getToken() }
  }
  return axios.post(api, data, config)
}