From 9bd9e5843988b55bd1c143bbe7bd07a7f6baaed8 Mon Sep 17 00:00:00 2001 From: yuliang_guo Date: Sat, 31 Jan 2026 12:02:11 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=AF=BE=E7=A8=8B=E8=B5=84=E6=96=99sche?= =?UTF-8?q?ma=E6=94=AF=E6=8C=81PPT/PPTX=E6=96=87=E4=BB=B6=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app/schemas/course.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/app/schemas/course.py b/backend/app/schemas/course.py index 781b532..9f01f28 100644 --- a/backend/app/schemas/course.py +++ b/backend/app/schemas/course.py @@ -175,15 +175,15 @@ class CourseMaterialCreate(CourseMaterialBase): @field_validator("file_type") def validate_file_type(cls, v): """验证文件类型 - 支持格式:TXT、Markdown、MDX、PDF、HTML、Excel、Word、CSV、VTT、Properties + 支持格式:TXT、Markdown、MDX、PDF、HTML、Excel、Word、PPT、CSV、VTT、Properties """ allowed_types = [ "txt", "md", "mdx", "pdf", "html", "htm", - "xlsx", "xls", "docx", "doc", "csv", "vtt", "properties" + "xlsx", "xls", "docx", "doc", "pptx", "ppt", "csv", "vtt", "properties" ] file_ext = v.lower() if file_ext not in allowed_types: - raise ValueError(f"不支持的文件类型: {v}。允许的类型: TXT、Markdown、MDX、PDF、HTML、Excel、Word、CSV、VTT、Properties") + raise ValueError(f"不支持的文件类型: {v}。允许的类型: TXT、Markdown、MDX、PDF、HTML、Excel、Word、PPT、CSV、VTT、Properties") return file_ext