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 27bf6ad9e..ad6a86ff2 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 @@ -349,11 +349,11 @@ const localLoading = computed({ const upload = ref() -const imageExtensions = ['jpg', 'jpeg', 'png', 'gif', 'bmp'] -const documentExtensions = ['pdf', 'docx', 'txt', 'xls', 'xlsx', 'md', 'html', 'csv'] +const imageExtensions = ['JPG', 'JPEG', 'PNG', 'GIF', 'BMP'] +const documentExtensions = ['PDF', 'DOCX', 'TXT', 'XLS', 'XLSX', 'MD', 'HTML', 'CSV'] const videoExtensions: any = [] -const audioExtensions = ['mp3', 'wav', 'ogg', 'aac', 'm4a'] -let otherExtensions = ['ppt', 'doc'] +const audioExtensions = ['MP3', 'WAV', 'OGG', 'AAC', 'M4A'] +let otherExtensions = ['PPT', 'DOC'] const getAcceptList = () => { const { image, document, audio, video, other } = props.applicationDetails.file_upload_setting @@ -417,7 +417,7 @@ const uploadFile = async (file: any, fileList: any) => { const formData = new FormData() formData.append('file', file.raw, file.name) // - const extension = file.name.split('.').pop().toLowerCase() // 获取文件后缀名并转为小写 + const extension = file.name.split('.').pop().toUpperCase() // 获取文件后缀名并转为小写 if (imageExtensions.includes(extension)) { uploadImageList.value.push(file) diff --git a/ui/src/workflow/nodes/base-node/component/FileUploadSettingDialog.vue b/ui/src/workflow/nodes/base-node/component/FileUploadSettingDialog.vue index 5e943af32..0f55fa1dd 100644 --- a/ui/src/workflow/nodes/base-node/component/FileUploadSettingDialog.vue +++ b/ui/src/workflow/nodes/base-node/component/FileUploadSettingDialog.vue @@ -63,7 +63,7 @@ }}
-{{ documentExtensions.map(s => s.toUpperCase()).join('、') }}
+{{ documentExtensions.join('、') }}
{{ imageExtensions.map(s => s.toUpperCase()).join('、') }}
+{{ imageExtensions.join('、') }}
{{ audioExtensions.map(s => s.toUpperCase()).join('、') }}
+{{ audioExtensions.join('、') }}