Skip to content

Commit 16f4d2a

Browse files
committed
feat: add upload method selection prompt to file upload settings
1 parent ac97e60 commit 16f4d2a

File tree

4 files changed

+7
-0
lines changed

4 files changed

+7
-0
lines changed

ui/src/locales/lang/en-US/common.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ export default {
6060
existingExtensionsTip: 'The following extensions already exist',
6161
localUpload: 'Local Files',
6262
urlUpload: 'URL',
63+
uploadMethodTip: 'Please select upload method',
6364
},
6465
status: {
6566
label: 'Status',

ui/src/locales/lang/zh-CN/common.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ export default {
6262
existingExtensionsTip: '文件后缀已存在',
6363
localUpload: '本地文件',
6464
urlUpload: 'URL 地址',
65+
uploadMethodTip: '请选择上传方式'
6566
},
6667
status: {
6768
label: '状态',

ui/src/locales/lang/zh-Hant/common.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ export default {
6060
existingExtensionsTip: '文件後綴已存在',
6161
localUpload: '本地文件',
6262
urlUpload: 'URL 地址',
63+
uploadMethodTip: '請選擇上傳方式'
6364
},
6465
status: {
6566
label: '狀態',

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,10 @@ const handleInputConfirm = () => {
341341
342342
async function submit() {
343343
const formEl = fieldFormRef.value
344+
if (!form_data.value.local_upload && !form_data.value.url_upload) {
345+
MsgWarning(t('common.fileUpload.uploadMethodTip'))
346+
return
347+
}
344348
if (!formEl) return
345349
await formEl.validate().then(() => {
346350
const formattedData = cloneDeep(form_data.value)

0 commit comments

Comments
 (0)