Fix chatdoc upload issue (#48)

This commit is contained in:
AceDataCloud committed 2024-01-29 16:17:07 +00:00
1 parent f2b2093ab5
commit 7596cf3669
2 files changed
+13 -3

No files matched your search

@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "fix chatdoc upload issue",
"packageName": "@zhishuyun/hub",
"email": "cqc@germey.cn",
"dependentChangeType": "patch"
}
+6 -3
View File
@@ -2,7 +2,7 @@
<el-dialog v-model="dialogVisible">
<el-upload
v-model:file-list="fileList"
accept=".docx,.doc,.pdf,.txt"
accept=".docx,.doc,.pdf,.txt,.csv,.enex,.epub,.eml,.html,.htm,.shtml,.md,.odt,.ppt,.pptx,.txt"
drag
:class="{
upload: true
@@ -11,7 +11,7 @@
:show-file-list="true"
:limit="1"
:multiple="false"
action="/api/v1/files/"
:action="uploadUrl"
:on-exceed="onExceed"
:on-error="onError"
:on-success="onSuccess"
@@ -29,11 +29,13 @@
import { defineComponent } from 'vue';
import { ElButton, ElDialog, ElUpload, ElIcon, ElMessage, UploadFiles } from 'element-plus';
import { UploadFilled } from '@element-plus/icons-vue';
import { getBaseUrlData } from '@/utils';
interface IData {
dialogVisible: boolean;
fileList: UploadFiles;
learning: boolean;
uploadUrl: string;
}
export default defineComponent({
@@ -49,7 +51,8 @@ export default defineComponent({
return {
dialogVisible: false,
fileList: [],
learning: false
learning: false,
uploadUrl: getBaseUrlData() + '/api/v1/files/'
};
},
computed: {