/**
 * @desc 文件上传
 */

import * as defs from '../../baseClass'
import { defHttp } from '/@/utils/http/axios'

export class Params {}

export const init = new defs.Result()

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

            ...config,
        },
        options,
    )
}
