Ensure front-end file type uploads are synchronized with back-end

This commit is contained in:
yangdx 2025-08-19 15:10:13 +08:00
parent ac33cf693d
commit e38df464ea
2 changed files with 35 additions and 33 deletions

View file

@ -1626,9 +1626,7 @@ class LightRAG:
doc_id: { doc_id: {
"status": DocStatus.PROCESSED, "status": DocStatus.PROCESSED,
"chunks_count": len(chunks), "chunks_count": len(chunks),
"chunks_list": list( "chunks_list": list(chunks.keys()),
chunks.keys()
), # 保留 chunks_list
"content_summary": status_doc.content_summary, "content_summary": status_doc.content_summary,
"content_length": status_doc.content_length, "content_length": status_doc.content_length,
"created_at": status_doc.created_at, "created_at": status_doc.created_at,

View file

@ -31,36 +31,40 @@ export const supportedFileTypes = {
'text/plain': [ 'text/plain': [
'.txt', '.txt',
'.md', '.md',
'.html', '.pdf',
'.htm', '.docx',
'.tex', '.pptx',
'.json', '.xlsx',
'.xml', '.rtf', //# Rich Text Format
'.yaml', '.odt', // # OpenDocument Text
'.yml', '.tex', // # LaTeX
'.rtf', '.epub', // # Electronic Publication
'.odt', '.html', // # HyperText Markup Language
'.epub', '.htm', // # HyperText Markup Language
'.csv', '.csv', // # Comma-Separated Values
'.log', '.json', // # JavaScript Object Notation
'.conf', '.xml', // # eXtensible Markup Language
'.ini', '.yaml', // # YAML Ain't Markup Language
'.properties', '.yml', // # YAML
'.sql', '.log', // # Log files
'.bat', '.conf', // # Configuration files
'.sh', '.ini', // # Initialization files
'.c', '.properties', // # Java properties files
'.cpp', '.sql', // # SQL scripts
'.py', '.bat', // # Batch files
'.java', '.sh', // # Shell scripts
'.js', '.c', // # C source code
'.ts', '.cpp', // # C++ source code
'.swift', '.py', // # Python source code
'.go', '.java', // # Java source code
'.rb', '.js', // # JavaScript source code
'.php', '.ts', // # TypeScript source code
'.css', '.swift', // # Swift source code
'.scss', '.go', // # Go source code
'.rb', // # Ruby source code
'.php', // # PHP source code
'.css', // # Cascading Style Sheets
'.scss', //# Sassy CSS
'.less' '.less'
], ],
'application/pdf': ['.pdf'], 'application/pdf': ['.pdf'],