import { request } from '@/service/request';

/**
 * 统一上传文件
 * @param data
 * @returns
 */
export function fetchUpload(data: File, config?: any) {
  return request({
    url: '/admin/file/upload/img',
    method: 'post',
    data: {
      file: data
    },
    headers: {
      'Content-Type': 'multipart/form-data'
    },
    ...config
  });
}
