mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-08-26 08:36:19 +08:00
fix: file upload key loss #120
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user