import { Upload } from "@/api/interface/index";
import { PORT1 } from "@/api/config/servicePort";
import http from "@/api";

/**
 * @name 文件上传模块
 */
// 图片上传
export const uploadImg = (formData: any) => {
    //params: FormData
    let url = import.meta.env.VITE_APP_API_BASEURL + import.meta.env.VITE_APP_API_VERSION + "/Upload?type=material&name=";
    return http.post<any>(url, formData);
};

// 视频上传
export const uploadVideo = (params: FormData) => {
    return http.post<Upload.ResFileUrl>(PORT1 + `/file/upload/video`, params);
};
