mirror of
https://github.com/status-im/react-native-cameraroll.git
synced 2025-01-12 19:04:13 +00:00
Added name of the file with camera roll pictures
Summary: Added name parameter when delivering the camera roll images using react native CameraRoll library. Based on http://stackoverflow.com/questions/37283976/react-native-get-photo-name-from-camera-roll-ios Closes https://github.com/facebook/react-native/pull/9961 Differential Revision: D3883582 Pulled By: majak fbshipit-source-id: 5bfd1eb0601b3ce2ef1cdb4485060661d2fbad32
This commit is contained in:
parent
e515736126
commit
59a53de005
@ -185,12 +185,14 @@ RCT_EXPORT_METHOD(getPhotos:(NSDictionary *)params
|
||||
CGSize dimensions = [result defaultRepresentation].dimensions;
|
||||
CLLocation *loc = [result valueForProperty:ALAssetPropertyLocation];
|
||||
NSDate *date = [result valueForProperty:ALAssetPropertyDate];
|
||||
NSString *filename = [result defaultRepresentation].filename;
|
||||
[assets addObject:@{
|
||||
@"node": @{
|
||||
@"type": [result valueForProperty:ALAssetPropertyType],
|
||||
@"group_name": [group valueForProperty:ALAssetsGroupPropertyName],
|
||||
@"image": @{
|
||||
@"uri": uri,
|
||||
@"filename" : filename,
|
||||
@"height": @(dimensions.height),
|
||||
@"width": @(dimensions.width),
|
||||
@"isStored": @YES,
|
||||
|
Loading…
x
Reference in New Issue
Block a user