mirror of
https://github.com/moparisthebest/davmail
synced 2025-01-05 18:58:02 -05:00
add zip and PDF to recognized extensions in attachment content type fix
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@106 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
dd99fd0d02
commit
67e4c1b3b8
@ -1164,8 +1164,12 @@ public class ExchangeSession {
|
||||
throw new RuntimeException("Exception retrieving " + attachmentUrl + " : " + e + " " + e.getCause());
|
||||
}
|
||||
// fix content type for known extension
|
||||
if ("application/octet-stream".equalsIgnoreCase(result) && attachmentUrl.endsWith(".pdf")) {
|
||||
result = "application/pdf";
|
||||
if ("application/octet-stream".equalsIgnoreCase(result)) {
|
||||
if (attachmentUrl.endsWith(".pdf") || attachmentUrl.endsWith(".PDF")) {
|
||||
result = "application/pdf";
|
||||
} else if (attachmentUrl.endsWith(".zip") || attachmentUrl.endsWith(".ZIP")) {
|
||||
result = "application/zip";
|
||||
}
|
||||
}
|
||||
return result;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user