Add MIME types for PPT and PPTX files (#12562)

Otherwise, slide files cannot be opened in Chat module

### What problem does this PR solve?

Backend Reason (API): In the api/utils/web_utils.py file of the backend,
the CONTENT_TYPE_MAP dictionary is missing ppt and pptx.
MIME type mapping. This means that when the frontend requests a PPTX
file, the backend cannot correctly inform the browser that it is a PPTX
file, resulting in the file being displayed incorrectly.
Type identification error.

### Type of change

-  Bug Fix (non-breaking change which fixes an issue)

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
LIRUI YU
2026-01-13 12:17:49 +08:00
committed by GitHub
parent d76912ab15
commit 41c84fd78f

View File

@ -86,6 +86,9 @@ CONTENT_TYPE_MAP = {
"ico": "image/x-icon",
"avif": "image/avif",
"heic": "image/heic",
# PPTX
"ppt": "application/vnd.ms-powerpoint",
"pptx": "application/vnd.openxmLformats-officedocument.presentationml.presentation",
}
@ -239,4 +242,4 @@ def hash_code(code: str, salt: bytes) -> str:
def captcha_key(email: str) -> str:
return f"captcha:{email}"