mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-23 20:35:24 +00:00
(fix) Materalized link and image templates
This commit is contained in:
committed by
Francis Lachapelle
parent
34140e77fc
commit
4f75499439
@@ -303,7 +303,7 @@
|
||||
return [filename stringByEscapingURL];
|
||||
}
|
||||
|
||||
- (NSString *) pathToAttachment
|
||||
- (NSString *) _pathForAttachmentOrDownload: (BOOL) forDownload
|
||||
{
|
||||
NSMutableString *url;
|
||||
NSString *s, *attachment;
|
||||
@@ -315,16 +315,29 @@
|
||||
if (![url hasSuffix: @"/"])
|
||||
[url appendString: @"/"];
|
||||
|
||||
// s = [[self partPath] componentsJoinedByString: @"/"];
|
||||
if ([bodyPart isKindOfClass: [SOGoMailBodyPart class]])
|
||||
attachment = [self _filenameForAttachment: bodyPart];
|
||||
else
|
||||
attachment = @"0";
|
||||
|
||||
if (forDownload)
|
||||
[url appendString: @"asAttachment/"];
|
||||
|
||||
[url appendString: attachment];
|
||||
|
||||
return url;
|
||||
}
|
||||
|
||||
- (NSString *) pathToAttachment
|
||||
{
|
||||
return [self _pathForAttachmentOrDownload: NO];
|
||||
}
|
||||
|
||||
- (NSString *) pathForDownload
|
||||
{
|
||||
return [self _pathForAttachmentOrDownload: YES];
|
||||
}
|
||||
|
||||
- (NSString *) mimeImageURL
|
||||
{
|
||||
NSString *mimeImageFile, *mimeImageUrl;
|
||||
|
||||
Reference in New Issue
Block a user