mirror of
https://github.com/chatmail/core.git
synced 2026-05-16 21:36:30 +03:00
get_filemime() should return an empty string if no mimetype is present
and not default to `applicatopm/octet-stream`
This commit is contained in:
@@ -150,9 +150,10 @@ impl Message {
|
|||||||
if let Some((_, mime)) = guess_msgtype_from_suffix(Path::new(file)) {
|
if let Some((_, mime)) = guess_msgtype_from_suffix(Path::new(file)) {
|
||||||
return mime.to_string();
|
return mime.to_string();
|
||||||
}
|
}
|
||||||
|
return "application/octet-stream".to_string()
|
||||||
}
|
}
|
||||||
|
"".to_string()
|
||||||
|
|
||||||
"application/octet-stream".to_string()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_file(&self, context: &Context) -> Option<PathBuf> {
|
pub fn get_file(&self, context: &Context) -> Option<PathBuf> {
|
||||||
|
|||||||
Reference in New Issue
Block a user