mirror of
https://github.com/status-im/react-native-camera.git
synced 2026-08-31 21:51:12 +00:00
Add file extension to still image capture files
This commit is contained in:
+1
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user