/**
 * @desc 文件上传
 */
import { defHttp } from '/@/utils/http/axios'

export class Params {}

export function request(
    params: Params,
    form: FormData,
    config?: http.RequestConfig<Params | FormData>,
    options?: http.RequestOptions,
): Promise<string> {
    return defHttp.request(
        {
            url: '/common/file/upload',
            method: 'POST',
            data: form || params,
            headers: { 'Content-Type': 'multipart/form-data;charset=UTF-8' },

            ...config,
        },
        options,
    )
}
