mirror of
http://112.124.100.131/huang.ze/ebiz-dify-ai.git
synced 2025-12-10 19:36:53 +08:00
feat: remove documents limit (#1697)
This commit is contained in:
@@ -18,8 +18,6 @@ type IFileUploaderProps = {
|
||||
onFileUpdate: (fileItem: FileItem, progress: number, list: FileItem[]) => void
|
||||
onFileListUpdate?: (files: FileItem[]) => void
|
||||
onPreview: (file: File) => void
|
||||
countLimit: number
|
||||
countUsed: number
|
||||
}
|
||||
|
||||
const ACCEPTS = [
|
||||
@@ -41,8 +39,6 @@ const FileUploader = ({
|
||||
onFileUpdate,
|
||||
onFileListUpdate,
|
||||
onPreview,
|
||||
countLimit,
|
||||
countUsed,
|
||||
}: IFileUploaderProps) => {
|
||||
const { t } = useTranslation()
|
||||
const { notify } = useContext(ToastContext)
|
||||
@@ -149,10 +145,7 @@ const FileUploader = ({
|
||||
const initialUpload = useCallback((files: File[]) => {
|
||||
if (!files.length)
|
||||
return false
|
||||
if (files.length > countLimit - countUsed) {
|
||||
notify({ type: 'error', message: t('datasetCreation.stepOne.overCountLimit', { countLimit }) })
|
||||
return false
|
||||
}
|
||||
|
||||
const preparedFiles = files.map((file, index) => ({
|
||||
fileID: `file${index}-${Date.now()}`,
|
||||
file,
|
||||
|
||||
Reference in New Issue
Block a user