mirror of
https://github.com/moparisthebest/k-9
synced 2025-02-17 07:30:16 -05:00
Set content type of attachment even when no file name was found
This commit is contained in:
parent
ba979808fe
commit
e72afc1641
@ -1692,6 +1692,12 @@ public class LocalStore extends Store implements Serializable {
|
|||||||
contentDisposition,
|
contentDisposition,
|
||||||
name, // TODO: Should use encoded word defined in RFC 2231.
|
name, // TODO: Should use encoded word defined in RFC 2231.
|
||||||
size));
|
size));
|
||||||
|
} else {
|
||||||
|
bp.setHeader(MimeHeader.HEADER_CONTENT_TYPE, type);
|
||||||
|
bp.setHeader(MimeHeader.HEADER_CONTENT_DISPOSITION,
|
||||||
|
String.format("%s;\n size=%d",
|
||||||
|
contentDisposition,
|
||||||
|
size));
|
||||||
}
|
}
|
||||||
|
|
||||||
bp.setHeader(MimeHeader.HEADER_CONTENT_ID, contentId);
|
bp.setHeader(MimeHeader.HEADER_CONTENT_ID, contentId);
|
||||||
|
Loading…
Reference in New Issue
Block a user