mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-01 12:17:53 +00:00
Change attachmentData property of BITCrashAttachment to crashAttachmentData
This commit is contained in:
parent
01eef668d1
commit
75263f64fc
@ -43,7 +43,7 @@
|
||||
/**
|
||||
* The attachment data as NSData object
|
||||
*/
|
||||
@property (nonatomic, readonly, strong) NSData *attachmentData;
|
||||
@property (nonatomic, readonly, strong) NSData *crashAttachmentData;
|
||||
|
||||
/**
|
||||
* The content type of your data as MIME type
|
||||
@ -60,7 +60,7 @@
|
||||
* @return An instsance of BITCrashAttachment
|
||||
*/
|
||||
- (instancetype)initWithFilename:(NSString *)filename
|
||||
attachmentData:(NSData *)attachmentData
|
||||
crashAttachmentData:(NSData *)crashAttachmentData
|
||||
contentType:(NSString *)contentType;
|
||||
|
||||
@end
|
||||
|
||||
@ -31,12 +31,12 @@
|
||||
@implementation BITCrashAttachment
|
||||
|
||||
- (instancetype)initWithFilename:(NSString *)filename
|
||||
attachmentData:(NSData *)attachmentData
|
||||
crashAttachmentData:(NSData *)crashAttachmentData
|
||||
contentType:(NSString *)contentType
|
||||
{
|
||||
if (self = [super init]) {
|
||||
_filename = filename;
|
||||
_attachmentData = attachmentData;
|
||||
_crashAttachmentData = crashAttachmentData;
|
||||
_contentType = contentType;
|
||||
}
|
||||
|
||||
@ -48,14 +48,14 @@
|
||||
|
||||
- (void)encodeWithCoder:(NSCoder *)encoder {
|
||||
[encoder encodeObject:self.filename forKey:@"filename"];
|
||||
[encoder encodeObject:self.attachmentData forKey:@"data"];
|
||||
[encoder encodeObject:self.crashAttachmentData forKey:@"data"];
|
||||
[encoder encodeObject:self.contentType forKey:@"contentType"];
|
||||
}
|
||||
|
||||
- (id)initWithCoder:(NSCoder *)decoder {
|
||||
if ((self = [super init])) {
|
||||
_filename = [decoder decodeObjectForKey:@"filename"];
|
||||
_attachmentData = [decoder decodeObjectForKey:@"data"];
|
||||
_crashAttachmentData = [decoder decodeObjectForKey:@"data"];
|
||||
_contentType = [decoder decodeObjectForKey:@"contentType"];
|
||||
}
|
||||
return self;
|
||||
|
||||
@ -1005,7 +1005,7 @@ NSString *const kBITCrashManagerStatus = @"BITCrashManagerStatus";
|
||||
|
||||
BITCrashAttachment *attachment = (BITCrashAttachment *)dict[KBITAttachmentDictAttachment];
|
||||
|
||||
[postBody appendData:[BITHockeyAppClient dataWithPostValue:attachment.attachmentData
|
||||
[postBody appendData:[BITHockeyAppClient dataWithPostValue:attachment.crashAttachmentData
|
||||
forKey:key
|
||||
contentType:attachment.contentType
|
||||
boundary:boundary
|
||||
|
||||
@ -66,7 +66,7 @@
|
||||
NSData *data = [NSData dataWithContentsOfURL:@"mydatafile"];
|
||||
|
||||
BITCrashAttachment *attachment = [[BITCrashAttachment alloc] initWithFilename:@"myfile.data"
|
||||
attachmentData:data
|
||||
crashAttachmentData:data
|
||||
contentType:@"'application/octet-stream"];
|
||||
return attachment;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user