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 getAcceptList = () => {
|
||||||
const { image, document, audio, video } = props.applicationDetails.file_upload_setting
|
const { image, document, audio, video } = props.applicationDetails.file_upload_setting
|
||||||
let accepts = ''
|
let accepts: any = []
|
||||||
if (image) {
|
if (image) {
|
||||||
accepts += imageExtensions.map((ext) => '.' + ext).join(',')
|
accepts = [...imageExtensions]
|
||||||
}
|
}
|
||||||
if (document) {
|
if (document) {
|
||||||
accepts += documentExtensions.map((ext) => '.' + ext).join(',')
|
accepts = [...accepts, ...documentExtensions]
|
||||||
}
|
}
|
||||||
if (audio) {
|
if (audio) {
|
||||||
accepts += audioExtensions.map((ext) => '.' + ext).join(',')
|
accepts = [...accepts, ...audioExtensions]
|
||||||
}
|
}
|
||||||
if (video) {
|
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) => {
|
const uploadFile = async (file: any, fileList: any) => {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user