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('、') }}

@@ -121,7 +121,7 @@ }}

-

{{ audioExtensions.map(s => s.toUpperCase()).join('、') }}

+

{{ audioExtensions.join('、') }}

@@ -212,9 +212,9 @@ const loading = ref(false) const fieldFormRef = ref() const InputRef = ref() -const documentExtensions = ['txt', 'md', 'docx', 'html', 'csv', 'xlsx', 'xls', 'pdf'] -const imageExtensions = ['jpg', 'jpeg', 'png', 'gif'] -const audioExtensions = ['mp3', 'wav', 'ogg', 'acc', 'm4a'] +const documentExtensions = ['TXT', 'MD', 'DOCX', 'HTML', 'CSV', 'XLSX', 'XLS', 'PDF'] +const imageExtensions = ['JPG', 'JPEG', 'PNG', 'GIF'] +const audioExtensions = ['MP3', 'WAV', 'OGG', 'ACC', 'M4A'] const form_data = ref({ maxFiles: 3, @@ -224,7 +224,7 @@ const form_data = ref({ audio: false, video: false, other: false, - otherExtensions: ['ppt', 'doc'] + otherExtensions: ['PPT', 'DOC'] }) function open(data: any) { @@ -250,6 +250,7 @@ const showInput = () => { } const handleInputConfirm = () => { if (inputValue.value) { + inputValue.value = inputValue.value.toUpperCase() if ( form_data.value.otherExtensions.includes(inputValue.value) || documentExtensions.includes(inputValue.value) ||