feat: 添加PPT/PPTX文件类型支持
All checks were successful
continuous-integration/drone/push Build is passing

1. upload.py: 添加ppt/pptx到允许上传的文件类型
2. knowledge_analysis_v2.py: 添加PPT内容提取方法_extract_ppt_content
3. requirements.txt: 添加python-pptx依赖
This commit is contained in:
yuliang_guo
2026-01-31 11:49:10 +08:00
parent 4e817f6eef
commit c3aa4e85e7
3 changed files with 50 additions and 4 deletions

View File

@@ -23,10 +23,10 @@ logger = get_logger(__name__)
router = APIRouter(prefix="/upload")
# 支持的文件类型和大小限制
# 支持格式TXT、Markdown、MDX、PDF、HTML、Excel、Word、CSV、VTT、Properties
# 支持格式TXT、Markdown、MDX、PDF、HTML、Excel、Word、PPT、CSV、VTT、Properties
ALLOWED_EXTENSIONS = {
'txt', 'md', 'mdx', 'pdf', 'html', 'htm',
'xlsx', 'xls', 'docx', 'doc', 'csv', 'vtt', 'properties'
'xlsx', 'xls', 'docx', 'doc', 'pptx', 'ppt', 'csv', 'vtt', 'properties'
}
MAX_FILE_SIZE = 15 * 1024 * 1024 # 15MB