Skip to content

Commit b673135

Browse files
committed
fix: The conversation file cannot be displayed when uploading other files
1 parent 31147c0 commit b673135

File tree

1 file changed

+9
-4
lines changed
  • ui/src/components/ai-chat/component/chat-input-operate

1 file changed

+9
-4
lines changed

ui/src/components/ai-chat/component/chat-input-operate/index.vue

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ const imageExtensions = ['JPG', 'JPEG', 'PNG', 'GIF', 'BMP']
359359
const documentExtensions = ['PDF', 'DOCX', 'TXT', 'XLS', 'XLSX', 'MD', 'HTML', 'CSV']
360360
const videoExtensions: any = []
361361
const audioExtensions = ['MP3', 'WAV', 'OGG', 'AAC', 'M4A']
362-
let otherExtensions = ['PPT', 'DOC']
362+
let otherExtensions = ref(['PPT', 'DOC'])
363363
364364
const getAcceptList = () => {
365365
const { image, document, audio, video, other } = props.applicationDetails.file_upload_setting
@@ -378,8 +378,8 @@ const getAcceptList = () => {
378378
}
379379
if (other) {
380380
// 其他文件类型
381-
otherExtensions = props.applicationDetails.file_upload_setting.otherExtensions
382-
accepts = [...accepts, ...otherExtensions]
381+
otherExtensions.value = props.applicationDetails.file_upload_setting.otherExtensions
382+
accepts = [...accepts, ...otherExtensions.value]
383383
}
384384
385385
if (accepts.length === 0) {
@@ -507,7 +507,12 @@ const uploadImageList = computed(() => fileFilter(fileAllList.value, imageExtens
507507
const uploadDocumentList = computed(() => fileFilter(fileAllList.value, documentExtensions))
508508
const uploadVideoList = computed(() => fileFilter(fileAllList.value, videoExtensions))
509509
const uploadAudioList = computed(() => fileFilter(fileAllList.value, audioExtensions))
510-
const uploadOtherList = computed(() => fileFilter(fileAllList.value, otherExtensions))
510+
const uploadOtherList = computed(() =>
511+
fileFilter(
512+
fileAllList.value,
513+
otherExtensions.value.map((item) => item.toUpperCase()),
514+
),
515+
)
511516
512517
const showDelete = ref('')
513518

0 commit comments

Comments
 (0)