Add file extension to still image capture files

This commit is contained in:
Lochlan Wansbrough 2015-07-02 13:11:58 -07:00
parent e358622ff2
commit 3e211abf8a
1 changed files with 1 additions and 1 deletions

View File

@ -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;