mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
fix: 修复对话页面pdf不能正常上传的问题
--bug=1049431 --user=刘瑞斌 【应用编排】应用对话,上传文档无法选择pdf文档 https://www.tapd.cn/57709429/s/1616013
This commit is contained in:
parent
8133821e19
commit
ebfadf2b6c
|
|
@ -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) => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue