Skip to content

Commit

Permalink
add more mimes
Browse files Browse the repository at this point in the history
  • Loading branch information
skyzh committed Apr 23, 2021
1 parent 2043e3f commit 57708c9
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/s3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,20 @@ fn get_mime(key: &str) -> Option<String> {
Some("text/html; charset=utf-8".to_string())
} else if key.ends_with(".bz2") {
Some("application/x-bzip2".to_string())
} else if key.ends_with(".gz") {
Some("application/gzip".to_string())
} else if key.ends_with(".lz") {
Some("application/x-lzip".to_string())
} else if key.ends_with(".lzma") {
Some("application/x-lzma".to_string())
} else if key.ends_with(".xz") {
Some("application/x-xz".to_string())
} else if key.ends_with(".zst") {
Some("application/zstd".to_string())
} else if key.ends_with(".tar") {
Some("application/x-tar".to_string())
} else if key.ends_with(".zip") {
Some("application/zip".to_string())
} else {
None
}
Expand Down

0 comments on commit 57708c9

Please sign in to comment.