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
610c4826a5
commit
9ee815f6b5
|
@ -185,12 +185,14 @@ RCT_EXPORT_METHOD(getPhotos:(NSDictionary *)params
|
||||||
CGSize dimensions = [result defaultRepresentation].dimensions;
|
CGSize dimensions = [result defaultRepresentation].dimensions;
|
||||||
CLLocation *loc = [result valueForProperty:ALAssetPropertyLocation];
|
CLLocation *loc = [result valueForProperty:ALAssetPropertyLocation];
|
||||||
NSDate *date = [result valueForProperty:ALAssetPropertyDate];
|
NSDate *date = [result valueForProperty:ALAssetPropertyDate];
|
||||||
|
NSString *filename = [result defaultRepresentation].filename;
|
||||||
[assets addObject:@{
|
[assets addObject:@{
|
||||||
@"node": @{
|
@"node": @{
|
||||||
@"type": [result valueForProperty:ALAssetPropertyType],
|
@"type": [result valueForProperty:ALAssetPropertyType],
|
||||||
@"group_name": [group valueForProperty:ALAssetsGroupPropertyName],
|
@"group_name": [group valueForProperty:ALAssetsGroupPropertyName],
|
||||||
@"image": @{
|
@"image": @{
|
||||||
@"uri": uri,
|
@"uri": uri,
|
||||||
|
@"filename" : filename,
|
||||||
@"height": @(dimensions.height),
|
@"height": @(dimensions.height),
|
||||||
@"width": @(dimensions.width),
|
@"width": @(dimensions.width),
|
||||||
@"isStored": @YES,
|
@"isStored": @YES,
|
||||||
|
|
Loading…
Reference in New Issue