mirror of
https://gitee.com/dapppp/ruoyi-plus-vben5.git
synced 2026-03-17 21:42:00 +08:00
feat(oss): 添加测试上传功能
新增上传测试模态框组件,支持图片和文件上传测试 在OSS管理页面添加测试上传按钮 为上传API添加Content-Type头部配置 修复全屏引导hook的类型断言问题
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import type { AxiosRequestConfig } from '@vben/request';
|
||||
|
||||
import { alovaInstance } from '#/utils/http';
|
||||
import { ContentTypeEnum } from '#/utils/http/helper';
|
||||
|
||||
/**
|
||||
* Axios上传进度事件
|
||||
@@ -33,7 +34,12 @@ export function uploadApi(
|
||||
return alovaInstance.post<UploadResult>(
|
||||
'/resource/oss/upload',
|
||||
{ file, ...otherData },
|
||||
{ timeout: 60_000 },
|
||||
{
|
||||
timeout: 60_000,
|
||||
headers: {
|
||||
'Content-Type': ContentTypeEnum.FORM_DATA,
|
||||
},
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user