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

const apiPrefix = '/api/searchterm/';

export function uploadFile(file: any) {
  const formData = new FormData();
  formData.append('file', file);
  return request({
    url: apiPrefix + 'upload_file/',
    method: 'POST',
    data: formData,
    headers: {
      'Content-Type': 'multipart/form-data',
    },
  });
}

export function confirmUploadFile(query: any) {
  return request({
    url: apiPrefix + 'upload_file/',
    method: 'POST',
    params: query,
  });
}
