feat(knowledgeBase): add media file validation and PDF enhancement method selection

- Add i18n translations for file size and duration validation errors in English and Chinese
- Implement media file validation with 256MB size limit and 150-second duration limit
- Add support for audio and video file formats (mp3, mp4, mov, wav) in dataset creation
- Add checkMediaDuration helper function to validate media file duration using HTML5 media API
- Add PDF enhancement method selection dropdown with options (DeepDoc, MinerU, TextLN)
- Change default PDF enhancement setting from disabled to enabled
- Update file type array to include media formats
- Add error messaging for file size and duration validation failures
- Improve UI spacing for file parsing settings section
This commit is contained in:
yujiangping
2025-12-25 17:39:01 +08:00
parent 07668ee4c5
commit 99c501f188
4 changed files with 103 additions and 26 deletions

View File

@@ -615,6 +615,11 @@ export const en = {
qaMode: 'QA Mode',
fileParsingSettings: 'File Parsing Settings',
pdfEnhancementAnalysis: 'PDF Enhancement Analysis',
fileSizeExceeds: 'File size exceeds the limit',
sizeLimitError: 'The file size exceeds the limit. The maximum supported size is 256MB. The current file size is',
fileDurationExceeds: 'File duration exceeds the limit',
fileDurationLimitError: 'The duration of the media file exceeds the limit. The maximum supported duration is 150 seconds. Current duration',
unableReadFile:'Unable to read the information of the media file. Please check the file format.',
createForm:{
name: 'Name',
embedding_id: 'Embedding',

View File

@@ -239,6 +239,11 @@ export const zh = {
qaMode: '问答模式',
fileParsingSettings: '文件解析设置',
pdfEnhancementAnalysis: 'PDF增强解析',
fileSizeExceeds: '文件大小超过限制',
sizeLimitError: '文件大小超过限制最大支持256MB当前文件大小',
fileDurationExceeds:'文件时长超过限制',
fileDurationLimitError: '媒体文件时长超过限制最大支持150秒当前时长',
unableReadFile:'无法读取媒体文件信息,请检查文件格式',
createForm: {
name: '名称',
embedding_id: '嵌入模型',