Skip to content

Commit

Permalink
fix: 修复对话页面pdf不能正常上传的问题
Browse files Browse the repository at this point in the history
--bug=1049431 --user=刘瑞斌 【应用编排】应用对话,上传文档无法选择pdf文档 https://www.tapd.cn/57709429/s/1616013
  • Loading branch information
liuruibin committed Nov 25, 2024
1 parent 8133821 commit 5c3ba71
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions ui/src/components/ai-chat/component/chat-input-operate/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -202,20 +202,21 @@ const audioExtensions = ['mp3', 'wav', 'aac', 'flac']
const getAcceptList = () => {
const { image, document, audio, video } = props.applicationDetails.file_upload_setting
let accepts = ''
let accepts: any = []
if (image) {
accepts += imageExtensions.map((ext) => '.' + ext).join(',')
accepts = [...imageExtensions]
}
if (document) {
accepts += documentExtensions.map((ext) => '.' + ext).join(',')
accepts = [...accepts, ...documentExtensions]
}
if (audio) {
accepts += audioExtensions.map((ext) => '.' + ext).join(',')
accepts = [...accepts, ...audioExtensions]
}
if (video) {
accepts += videoExtensions.map((ext) => '.' + ext).join(',')
accepts = [...accepts, ...videoExtensions]
}
return accepts
// console.log(accepts)
return accepts.map((ext: any) => '.' + ext).join(',')
}
const uploadFile = async (file: any, fileList: any) => {
Expand Down

0 comments on commit 5c3ba71

Please sign in to comment.