diff --git a/ui/src/components/ai-chat/component/chat-input-operate/index.vue b/ui/src/components/ai-chat/component/chat-input-operate/index.vue
index 452a5d0d7..004748175 100644
--- a/ui/src/components/ai-chat/component/chat-input-operate/index.vue
+++ b/ui/src/components/ai-chat/component/chat-input-operate/index.vue
@@ -75,9 +75,9 @@
-
{
fileList.splice(0, fileList.length)
return
}
- const formData = new FormData()
- for (const file of fileList) {
- formData.append('file', file.raw, file.name)
- //
- const extension = file.name.split('.').pop().toLowerCase() // 获取文件后缀名并转为小写
- if (imageExtensions.includes(extension)) {
- uploadImageList.value.push(file)
- } else if (documentExtensions.includes(extension)) {
- uploadDocumentList.value.push(file)
- } else if (videoExtensions.includes(extension)) {
- // videos.push(file)
- } else if (audioExtensions.includes(extension)) {
- // audios.push(file)
- }
+ const formData = new FormData()
+ formData.append('file', file.raw, file.name)
+ //
+ const extension = file.name.split('.').pop().toLowerCase() // 获取文件后缀名并转为小写
+
+ if (imageExtensions.includes(extension)) {
+ uploadImageList.value.push(file)
+ } else if (documentExtensions.includes(extension)) {
+ uploadDocumentList.value.push(file)
+ } else if (videoExtensions.includes(extension)) {
+ // videos.push(file)
+ } else if (audioExtensions.includes(extension)) {
+ // audios.push(file)
}
+
if (!chatId_context.value) {
const res = await props.openChatId()
chatId_context.value = res