mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-20 01:29:04 +08:00
fix: file upload limits in web app
This commit is contained in:
parent
543503c398
commit
b95d0fa9a9
@ -74,7 +74,7 @@ const Form = () => {
|
|||||||
allowed_file_types: appParams?.file_upload?.allowed_file_types,
|
allowed_file_types: appParams?.file_upload?.allowed_file_types,
|
||||||
allowed_file_extensions: appParams?.file_upload?.allowed_file_extensions,
|
allowed_file_extensions: appParams?.file_upload?.allowed_file_extensions,
|
||||||
allowed_file_upload_methods: appParams?.file_upload?.allowed_file_upload_methods,
|
allowed_file_upload_methods: appParams?.file_upload?.allowed_file_upload_methods,
|
||||||
number_limits: appParams?.file_upload?.number_limits,
|
number_limits: appParams?.file_upload?.max_length,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
import { useCallback } from 'react'
|
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
import { useEmbeddedChatbotContext } from '../context'
|
import { useEmbeddedChatbotContext } from '../context'
|
||||||
import Input from './form-input'
|
import Input from './form-input'
|
||||||
@ -17,12 +16,12 @@ const Form = () => {
|
|||||||
isMobile,
|
isMobile,
|
||||||
} = useEmbeddedChatbotContext()
|
} = useEmbeddedChatbotContext()
|
||||||
|
|
||||||
const handleFormChange = useCallback((variable: string, value: any) => {
|
const handleFormChange = (variable: string, value: any) => {
|
||||||
handleNewConversationInputsChange({
|
handleNewConversationInputsChange({
|
||||||
...newConversationInputsRef.current,
|
...newConversationInputsRef.current,
|
||||||
[variable]: value,
|
[variable]: value,
|
||||||
})
|
})
|
||||||
}, [newConversationInputs, handleNewConversationInputsChange])
|
}
|
||||||
|
|
||||||
const renderField = (form: any) => {
|
const renderField = (form: any) => {
|
||||||
const {
|
const {
|
||||||
@ -87,7 +86,7 @@ const Form = () => {
|
|||||||
allowed_file_types: appParams?.file_upload?.allowed_file_types,
|
allowed_file_types: appParams?.file_upload?.allowed_file_types,
|
||||||
allowed_file_extensions: appParams?.file_upload?.allowed_file_extensions,
|
allowed_file_extensions: appParams?.file_upload?.allowed_file_extensions,
|
||||||
allowed_file_upload_methods: appParams?.file_upload?.allowed_file_upload_methods,
|
allowed_file_upload_methods: appParams?.file_upload?.allowed_file_upload_methods,
|
||||||
number_limits: appParams?.file_upload?.number_limits,
|
number_limits: appParams?.file_upload?.max_length,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user