mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-10-08 05:17:15 +00:00
This commit is contained in:
1 parent
7ad7f5efa6
commit
f5ed10b00c
1 file changed
+14
-8
@@ -716,15 +716,21 @@ static NSArray *infoKeys = nil;
|
||||
mime = [draftFileAttachement objectForKey: @"part"];
|
||||
if ([mime isImage]) {
|
||||
contentId = [mime contentId];
|
||||
contentId = [contentId stringByReplacingOccurrencesOfString: @"<" withString: @"cid:"];
|
||||
contentId = [contentId stringByReplacingOccurrencesOfString: @">" withString: @""];
|
||||
if (contentId) {
|
||||
contentId = [contentId stringByReplacingOccurrencesOfString: @"<" withString: @"cid:"];
|
||||
contentId = [contentId stringByReplacingOccurrencesOfString: @">" withString: @""];
|
||||
|
||||
if ([[mime encoding] isEqualToString: @"base64"]) {
|
||||
lText = [text stringByReplacingOccurrencesOfString: contentId
|
||||
withString: [NSString stringWithFormat: @"data:%@;base64,%@",
|
||||
[[mime contentType] stringValue],
|
||||
[NSString stringWithUTF8String: [[mime body] bytes]]]];
|
||||
[self setText: lText];
|
||||
if ([[mime encoding] isEqualToString: @"base64"] && contentId) {
|
||||
lText = [text stringByReplacingOccurrencesOfString: contentId
|
||||
withString: [NSString stringWithFormat: @"data:%@;base64,%@",
|
||||
[[mime contentType] stringValue],
|
||||
[NSString stringWithUTF8String: [[mime body] bytes]]]];
|
||||
[self setText: lText];
|
||||
} else {
|
||||
[self warnWithFormat: @"Empty content id [1] : %@", contentId];
|
||||
}
|
||||
} else {
|
||||
[self warnWithFormat: @"Empty content id [2] : %@", contentId];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user