Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
imClumsyPanda 2023-05-15 18:58:51 +08:00
commit 0fca4c9590
2 changed files with 6 additions and 2 deletions

View File

@ -32,3 +32,6 @@ export const deletefile = (params: any) => {
data: JSON.stringify(params),
})
}
export const web_url = () => {
return window.location.origin
}

View File

@ -3,7 +3,7 @@ import { onMounted, ref, toRef } from 'vue'
import { NInput, NP, NPopconfirm, NScrollbar, NText, NUpload, NUploadDragger } from 'naive-ui'
import { SvgIcon } from '@/components/common'
import { useChatStore } from '@/store'
import { deletefile, getfilelist } from '@/api/chat'
import { deletefile, getfilelist, web_url } from '@/api/chat'
const knowledge = defineProps({
knowledgebaseid: {
type: String, //
@ -35,13 +35,14 @@ function handleEnter({ uuid }: Chat.History, isEdit: boolean, event: KeyboardEve
if (event.key === 'Enter')
chatStore.updateHistory(uuid, { isEdit })
}
console.log(`${web_url()}/api/local_doc_qa/upload_file`)
</script>
<template>
<NUpload
multiple
directory-dnd
action="http://127.0.0.1:1002/api/local_doc_qa/upload_file"
:action="`${web_url()}/api/local_doc_qa/upload_file`"
:headers="{
'naive-info': 'hello!',
}"