Update src/server/http.rs
This commit is contained in:
parent
bbe9322c94
commit
05bf2b7294
@ -186,6 +186,10 @@ fn get_content_type(file_path: &str) -> &'static str {
|
|||||||
"audio/mpeg"
|
"audio/mpeg"
|
||||||
} else if file_path.ends_with(".mp4") {
|
} else if file_path.ends_with(".mp4") {
|
||||||
"video/mp4"
|
"video/mp4"
|
||||||
|
} else if file_path.ends_with(".pdf") {
|
||||||
|
"application/pdf"
|
||||||
|
} else if file_path.ends_with(".md") {
|
||||||
|
"text/markdown"
|
||||||
} else {
|
} else {
|
||||||
"text/plain"
|
"text/plain"
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user