fix: file upload key loss #120

This commit is contained in:
vben
2020-12-08 22:18:20 +08:00
parent bae53f3e2c
commit 29461a8568
14 changed files with 29 additions and 12 deletions

View File

@@ -1,10 +1,9 @@
import { UploadApiResult } from './model/uploadModel';
import { defHttp } from '/@/utils/http/axios';
import { UploadFileParams } from '/@/utils/http/axios/types';
import { useGlobSetting } from '/@/hooks/setting';
enum Api {
UPLOAD_URL = '/upload',
}
const { uploadUrl = '' } = useGlobSetting();
/**
* @description: Upload interface
@@ -15,7 +14,7 @@ export function uploadApi(
) {
return defHttp.uploadFile<UploadApiResult>(
{
url: Api.UPLOAD_URL,
url: uploadUrl,
onUploadProgress,
},
params