feat: more content types
This commit is contained in:
@@ -116,7 +116,11 @@ fn main() {
|
|||||||
|
|
||||||
fn get_content_type(file_name: &str) -> String {
|
fn get_content_type(file_name: &str) -> String {
|
||||||
let file_name = file_name.to_ascii_lowercase();
|
let file_name = file_name.to_ascii_lowercase();
|
||||||
if file_name.ends_with(".txt") {
|
if file_name.ends_with(".txt")
|
||||||
|
|| file_name.ends_with(".text")
|
||||||
|
|| file_name.ends_with(".diff")
|
||||||
|
|| file_name.ends_with(".md")
|
||||||
|
|| file_name.ends_with(".markdown") {
|
||||||
"text/plain".into()
|
"text/plain".into()
|
||||||
} else if file_name.ends_with(".aac") {
|
} else if file_name.ends_with(".aac") {
|
||||||
"audio/aac".into()
|
"audio/aac".into()
|
||||||
|
|||||||
Reference in New Issue
Block a user