Skip to content

Commit ebfadf2

Browse files
committed
fix: 修复对话页面pdf不能正常上传的问题
--bug=1049431 --user=刘瑞斌 【应用编排】应用对话,上传文档无法选择pdf文档 https://www.tapd.cn/57709429/s/1616013
1 parent 8133821 commit ebfadf2

File tree

1 file changed

+7
-6
lines changed
  • ui/src/components/ai-chat/component/chat-input-operate

1 file changed

+7
-6
lines changed

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

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -202,20 +202,21 @@ const audioExtensions = ['mp3', 'wav', 'aac', 'flac']
202202
203203
const getAcceptList = () => {
204204
const { image, document, audio, video } = props.applicationDetails.file_upload_setting
205-
let accepts = ''
205+
let accepts: any = []
206206
if (image) {
207-
accepts += imageExtensions.map((ext) => '.' + ext).join(',')
207+
accepts = [...imageExtensions]
208208
}
209209
if (document) {
210-
accepts += documentExtensions.map((ext) => '.' + ext).join(',')
210+
accepts = [...accepts, ...documentExtensions]
211211
}
212212
if (audio) {
213-
accepts += audioExtensions.map((ext) => '.' + ext).join(',')
213+
accepts = [...accepts, ...audioExtensions]
214214
}
215215
if (video) {
216-
accepts += videoExtensions.map((ext) => '.' + ext).join(',')
216+
accepts = [...accepts, ...videoExtensions]
217217
}
218-
return accepts
218+
// console.log(accepts)
219+
return accepts.map((ext: any) => '.' + ext).join(',')
219220
}
220221
221222
const uploadFile = async (file: any, fileList: any) => {

0 commit comments

Comments
 (0)