From 3e211abf8a30bb4a19b70c5b32af61ba2dd11cd9 Mon Sep 17 00:00:00 2001 From: Lochlan Wansbrough Date: Thu, 2 Jul 2015 13:11:58 -0700 Subject: [PATCH] Add file extension to still image capture files --- RCTCameraManager.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RCTCameraManager.m b/RCTCameraManager.m index b7d0c52..473f90f 100644 --- a/RCTCameraManager.m +++ b/RCTCameraManager.m @@ -281,7 +281,7 @@ RCT_EXPORT_METHOD(capture:(NSDictionary *)options callback:(RCTResponseSenderBlo NSData *data = UIImageJPEGRepresentation(image, 1.0); NSFileManager *fileManager = [NSFileManager defaultManager]; - NSString *fullPath = [documentsDirectory stringByAppendingPathComponent:name]; + NSString *fullPath = [[documentsDirectory stringByAppendingPathComponent:name] stringByAppendingPathExtension:@"jpg"]; [fileManager createFileAtPath:fullPath contents:data attributes:nil]; return fullPath;