fix: The conversation file cannot be displayed when uploading other files (#3513)

This commit is contained in:
shaohuzhang1 2025-07-08 17:44:54 +08:00 committed by GitHub
parent 31147c0f6e
commit c7d1ba6a73
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -359,7 +359,7 @@ 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']
let otherExtensions = ref(['PPT', 'DOC'])
const getAcceptList = () => {
const { image, document, audio, video, other } = props.applicationDetails.file_upload_setting
@ -378,8 +378,8 @@ const getAcceptList = () => {
}
if (other) {
//
otherExtensions = props.applicationDetails.file_upload_setting.otherExtensions
accepts = [...accepts, ...otherExtensions]
otherExtensions.value = props.applicationDetails.file_upload_setting.otherExtensions
accepts = [...accepts, ...otherExtensions.value]
}
if (accepts.length === 0) {
@ -507,7 +507,12 @@ const uploadImageList = computed(() => fileFilter(fileAllList.value, imageExtens
const uploadDocumentList = computed(() => fileFilter(fileAllList.value, documentExtensions))
const uploadVideoList = computed(() => fileFilter(fileAllList.value, videoExtensions))
const uploadAudioList = computed(() => fileFilter(fileAllList.value, audioExtensions))
const uploadOtherList = computed(() => fileFilter(fileAllList.value, otherExtensions))
const uploadOtherList = computed(() =>
fileFilter(
fileAllList.value,
otherExtensions.value.map((item) => item.toUpperCase()),
),
)
const showDelete = ref('')