Skip to content

Commit f646102

Browse files
committed
fix: update file upload settings to allow dynamic video extensions and improve input handling for other file types
1 parent b97f4e1 commit f646102

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ const upload = ref()
345345
346346
const imageExtensions = ['jpg', 'jpeg', 'png', 'gif', 'bmp']
347347
const documentExtensions = ['pdf', 'docx', 'txt', 'xls', 'xlsx', 'md', 'html', 'csv']
348-
const videoExtensions = ['mp4', 'avi', 'mov', 'mkv', 'flv']
348+
const videoExtensions: any = []
349349
const audioExtensions = ['mp3', 'wav', 'ogg', 'aac', 'm4a']
350350
let otherExtensions = ['ppt', 'doc']
351351

ui/src/workflow/nodes/base-node/component/FileUploadSettingDialog.vue

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
<p class="line-height-22 mt-4">
5757
{{ $t('common.fileUpload.document') }}
5858
<el-text class="color-secondary"
59-
>{{
59+
>{{
6060
$t(
6161
'views.applicationWorkflow.nodes.baseNode.FileUploadSetting.fileUploadType.documentText'
6262
)
@@ -86,7 +86,7 @@
8686
<p class="line-height-22 mt-4">
8787
{{ $t('common.fileUpload.image') }}
8888
<el-text class="color-secondary"
89-
>{{
89+
>{{
9090
$t(
9191
'views.applicationWorkflow.nodes.baseNode.FileUploadSetting.fileUploadType.imageText'
9292
)
@@ -114,7 +114,7 @@
114114
<p class="line-height-22 mt-4">
115115
{{ $t('common.fileUpload.audio') }}
116116
<el-text class="color-secondary"
117-
>{{
117+
>{{
118118
$t(
119119
'views.applicationWorkflow.nodes.baseNode.FileUploadSetting.fileUploadType.audioText'
120120
)
@@ -141,7 +141,7 @@
141141
<p class="line-height-22 mt-4">
142142
{{ $t('common.fileUpload.other') }}
143143
<el-text class="color-secondary"
144-
>{{
144+
>{{
145145
$t(
146146
'views.applicationWorkflow.nodes.baseNode.FileUploadSetting.fileUploadType.otherText'
147147
)
@@ -244,6 +244,11 @@ const showInput = () => {
244244
}
245245
const handleInputConfirm = () => {
246246
if (inputValue.value) {
247+
if (form_data.value.otherExtensions.includes(inputValue.value)) {
248+
inputVisible.value = false
249+
inputValue.value = ''
250+
return
251+
}
247252
form_data.value.otherExtensions.push(inputValue.value)
248253
}
249254
inputVisible.value = false

0 commit comments

Comments
 (0)