mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-17 22:35:56 +08:00
single file
This commit is contained in:
parent
4ed46e3fed
commit
ab19fccf3d
@ -157,7 +157,21 @@ const FormItem: FC<Props> = ({
|
||||
/>
|
||||
)
|
||||
}
|
||||
{(type === InputVarType.singleFile || type === InputVarType.multiFiles) && (
|
||||
{(type === InputVarType.singleFile) && (
|
||||
<FileUploaderInAttachmentWrapper
|
||||
onChange={(files) => {
|
||||
if (files.length)
|
||||
onChange(getProcessedFiles(files)[0])
|
||||
}}
|
||||
fileConfig={{
|
||||
allowed_file_types: payload.allowed_file_types,
|
||||
allowed_file_extensions: payload.allowed_file_extensions,
|
||||
allowed_file_upload_methods: payload.allowed_file_upload_methods,
|
||||
number_limits: 1,
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
{(type === InputVarType.multiFiles) && (
|
||||
<FileUploaderInAttachmentWrapper
|
||||
onChange={files => onChange(getProcessedFiles(files))}
|
||||
fileConfig={{
|
||||
|
@ -19,7 +19,11 @@ const UserInput = () => {
|
||||
const variables = startNode?.data.variables || []
|
||||
|
||||
const handleValueChange = (variable: string, v: string) => {
|
||||
workflowStore.getState().setInputs({
|
||||
const {
|
||||
inputs,
|
||||
setInputs,
|
||||
} = workflowStore.getState()
|
||||
setInputs({
|
||||
...inputs,
|
||||
[variable]: v,
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user