重写 el-upload httpRequest 文件上传成功会走成功的钩子,失败走失败的钩子

This commit is contained in:
puhui999
2024-02-27 23:34:32 +08:00
parent 174724da98
commit 32d5892422
2 changed files with 20 additions and 7 deletions

View File

@ -38,3 +38,8 @@ export const getFilePresignedUrl = (path: string) => {
export const createFile = (data: any) => {
return request.post({ url: '/infra/file/create', data })
}
// 上传文件
export const updateFile = (data: any) => {
return request.upload({ url: '/infra/file/upload', data })
}