import request from '@/utils/request'

/**
 * 上传单个文件
 * @param {FormData} formData 文件项file
 * @param {Funmction} onUploadProgress 进度处理函数
 * @param {Boolean} showLoading 是否打开loading,true
 * @param {Number} timeout 上传超时时间,60000
 * @returns 
 */
export const upload = (url,formData, onUploadProgress,showLoading=true,timeout=600000)=> request.post(url,formData,{onUploadProgress,timeout,showLoading});