Add file extension to still image capture files
This commit is contained in:
parent
e358622ff2
commit
3e211abf8a
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue