Set content type of attachment even when no file name was found

This commit is contained in:
cketti 2012-02-27 23:20:30 +01:00
parent ba979808fe
commit e72afc1641
1 changed files with 6 additions and 0 deletions

View File

@ -1692,6 +1692,12 @@ public class LocalStore extends Store implements Serializable {
contentDisposition,
name, // TODO: Should use encoded word defined in RFC 2231.
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);