mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
fix: update file upload settings to allow dynamic video extensions and improve input handling for other file types
This commit is contained in:
parent
b97f4e16ba
commit
f646102262
|
|
@ -345,7 +345,7 @@ const upload = ref()
|
|||
|
||||
const imageExtensions = ['jpg', 'jpeg', 'png', 'gif', 'bmp']
|
||||
const documentExtensions = ['pdf', 'docx', 'txt', 'xls', 'xlsx', 'md', 'html', 'csv']
|
||||
const videoExtensions = ['mp4', 'avi', 'mov', 'mkv', 'flv']
|
||||
const videoExtensions: any = []
|
||||
const audioExtensions = ['mp3', 'wav', 'ogg', 'aac', 'm4a']
|
||||
let otherExtensions = ['ppt', 'doc']
|
||||
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@
|
|||
<p class="line-height-22 mt-4">
|
||||
{{ $t('common.fileUpload.document') }}
|
||||
<el-text class="color-secondary"
|
||||
>{{
|
||||
>{{
|
||||
$t(
|
||||
'views.applicationWorkflow.nodes.baseNode.FileUploadSetting.fileUploadType.documentText'
|
||||
)
|
||||
|
|
@ -86,7 +86,7 @@
|
|||
<p class="line-height-22 mt-4">
|
||||
{{ $t('common.fileUpload.image') }}
|
||||
<el-text class="color-secondary"
|
||||
>{{
|
||||
>{{
|
||||
$t(
|
||||
'views.applicationWorkflow.nodes.baseNode.FileUploadSetting.fileUploadType.imageText'
|
||||
)
|
||||
|
|
@ -114,7 +114,7 @@
|
|||
<p class="line-height-22 mt-4">
|
||||
{{ $t('common.fileUpload.audio') }}
|
||||
<el-text class="color-secondary"
|
||||
>{{
|
||||
>{{
|
||||
$t(
|
||||
'views.applicationWorkflow.nodes.baseNode.FileUploadSetting.fileUploadType.audioText'
|
||||
)
|
||||
|
|
@ -141,7 +141,7 @@
|
|||
<p class="line-height-22 mt-4">
|
||||
{{ $t('common.fileUpload.other') }}
|
||||
<el-text class="color-secondary"
|
||||
>{{
|
||||
>{{
|
||||
$t(
|
||||
'views.applicationWorkflow.nodes.baseNode.FileUploadSetting.fileUploadType.otherText'
|
||||
)
|
||||
|
|
@ -244,6 +244,11 @@ const showInput = () => {
|
|||
}
|
||||
const handleInputConfirm = () => {
|
||||
if (inputValue.value) {
|
||||
if (form_data.value.otherExtensions.includes(inputValue.value)) {
|
||||
inputVisible.value = false
|
||||
inputValue.value = ''
|
||||
return
|
||||
}
|
||||
form_data.value.otherExtensions.push(inputValue.value)
|
||||
}
|
||||
inputVisible.value = false
|
||||
|
|
|
|||
Loading…
Reference in New Issue