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:
Muhammad Raihan Muhaimin 2016-09-17 20:29:27 -07:00 committed by Facebook Github Bot 8
parent 610c4826a5
commit 9ee815f6b5
1 changed files with 2 additions and 0 deletions

View File

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