From 05bf2b729432e0b2be1dcce64e6bdb485e7c8af3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=93=D1=80=D0=B8=D0=B3=D0=BE=D1=80=D0=B8=D0=B9=20=D0=A1?= =?UTF-8?q?=D0=B0=D1=84=D1=80=D0=BE=D0=BD=D0=BE=D0=B2?= Date: Fri, 12 Sep 2025 10:24:33 +0000 Subject: [PATCH] Update src/server/http.rs --- src/server/http.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/server/http.rs b/src/server/http.rs index 615cbba..68d7a2b 100644 --- a/src/server/http.rs +++ b/src/server/http.rs @@ -186,6 +186,10 @@ fn get_content_type(file_path: &str) -> &'static str { "audio/mpeg" } else if file_path.ends_with(".mp4") { "video/mp4" + } else if file_path.ends_with(".pdf") { + "application/pdf" + } else if file_path.ends_with(".md") { + "text/markdown" } else { "text/plain" } @@ -354,4 +358,4 @@ fn log_to_file(message: &str) { let log_message = format!("[{}] {}\n", timestamp, message); let _ = file.write_all(log_message.as_bytes()); } -} +} \ No newline at end of file