Skip to content

Commit

Permalink
Fix chatdoc upload issue (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
崔庆才丨静觅 committed Jan 29, 2024
1 parent 77bb709 commit 5c925f9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "fix chatdoc upload issue",
"packageName": "@zhishuyun/hub",
"email": "cqc@germey.cn",
"dependentChangeType": "patch"
}
9 changes: 6 additions & 3 deletions src/components/chatdoc/UploadDocument.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
Expand All @@ -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({
Expand All @@ -49,7 +51,8 @@ export default defineComponent({
return {
dialogVisible: false,
fileList: [],
learning: false
learning: false,
uploadUrl: getBaseUrlData() + '/api/v1/files/'
};
},
computed: {
Expand Down

0 comments on commit 5c925f9

Please sign in to comment.