import { http } from './http'

export async function uploadFile(file) {
  const formData = new FormData()
  formData.append('file', file)
  const { data } = await http.post('/api/common/file/upload', formData, {
    headers: {
      'Content-Type': 'multipart/form-data',
    },
  })
  return data.data
}
