App extension: Bug Fix - send the keys file does not work correctly

The attached file is not detected as keys files when the user selects it in the room history.
The associated mimetype was wrong
This commit is contained in:
Giom Foret
2017-08-22 00:31:43 +02:00
parent e53e7bc10b
commit b5ea138af5
@@ -450,7 +450,11 @@ typedef NS_ENUM(NSInteger, ImageCompressionMode)
}
return;
}
NSString *mimeType = [fileUrl pathExtension];
NSString *mimeType;
CFStringRef uti = UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, (__bridge CFStringRef)[fileUrl pathExtension] , NULL);
mimeType = (__bridge_transfer NSString *) UTTypeCopyPreferredTagWithClass(uti, kUTTagClassMIMEType);
CFRelease(uti);
__weak typeof(self) weakSelf = self;