mirror of
https://github.com/chatmail/core.git
synced 2026-05-02 21:06:31 +03:00
Do not override mime type set by the user
This commit is contained in:
@@ -1408,8 +1408,10 @@ async fn prepare_msg_blob(context: &Context, msg: &mut Message) -> Result<(), Er
|
|||||||
message::guess_msgtype_from_suffix(&blob.to_abs_path())
|
message::guess_msgtype_from_suffix(&blob.to_abs_path())
|
||||||
{
|
{
|
||||||
msg.viewtype = better_type;
|
msg.viewtype = better_type;
|
||||||
|
if !msg.param.exists(Param::MimeType) {
|
||||||
msg.param.set(Param::MimeType, better_mime);
|
msg.param.set(Param::MimeType, better_mime);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else if !msg.param.exists(Param::MimeType) {
|
} else if !msg.param.exists(Param::MimeType) {
|
||||||
if let Some((_, mime)) = message::guess_msgtype_from_suffix(&blob.to_abs_path()) {
|
if let Some((_, mime)) = message::guess_msgtype_from_suffix(&blob.to_abs_path()) {
|
||||||
msg.param.set(Param::MimeType, mime);
|
msg.param.set(Param::MimeType, mime);
|
||||||
|
|||||||
Reference in New Issue
Block a user