Skip to content

Commit 58939a8

Browse files
authored
Fix encoding issue by enforcing UTF-8 content type for transformed document uploads (#387)
* fix: Update content type mapping in document transformation service to include charset for markdown * pre commit
1 parent 4724a2b commit 58939a8

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

backend/app/core/doctransform/service.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,7 @@ def execute_job(
8989
convert_document(tmp_in, tmp_out, transformer_name)
9090

9191
# Determine content type based on target format
92-
content_type_map = {
93-
"markdown": "text/markdown",
94-
"text": "text/plain",
95-
"html": "text/html",
96-
}
92+
content_type_map = {"markdown": "text/markdown; charset=utf-8"}
9793
content_type = content_type_map.get(target_format, "text/plain")
9894

9995
# upload transformed file and create document record

0 commit comments

Comments
 (0)