Update to released mime_guess v2.0

This commit is contained in:
Sean McArthur
2019-08-14 11:36:42 -07:00
parent d29e12db10
commit 7d04fa1dfa
2 changed files with 2 additions and 2 deletions

View File

@@ -213,7 +213,7 @@ impl Part {
let ext = path.extension()
.and_then(|ext| ext.to_str())
.unwrap_or("");
let mime = mime_guess::get_mime_type(ext);
let mime = mime_guess::from_ext(ext).first_or_octet_stream();
let file = File::open(path)?;
let field = Part::new(Body::from(file))
.mime(mime);