1
0

feat(web): 增加文件上传接口

This commit is contained in:
2024-11-21 12:25:19 +08:00
parent 6d63c20b7f
commit d68f8a27ee
10 changed files with 338 additions and 6 deletions

View File

@@ -1,4 +1,5 @@
import {resourceAddDialog} from "../../components/resource/dialog-resource.js";
import {apiPost, inputFileFormItemCommonOptions} from "../../components/constants.js";
export function tabData() {
return {
@@ -10,6 +11,21 @@ export function tabData() {
label: '',
icon: 'fa fa-plus',
...resourceAddDialog()
},
{
type: 'form',
body: [
{
type: 'input-file',
name: 'file',
label: '测试文件上传',
...inputFileFormItemCommonOptions(undefined, 1073741824),
useChunk: true,
startChunkApi: apiPost('${base}/upload/start'),
chunkApi: apiPost('${base}/upload/slice'),
finishChunkApi: apiPost('${base}/upload/finish')
}
]
}
]
}