feat(lib): Filename added to the image properties iOS and Android (#61)

* fix(lib): mirror fix PHAsset video upload

https://github.com/facebook/react-native/commit/458e70c79d3e12b5ad017d17ccea2fd62c1c3781#diff-3a2b7a4c4ebe5ac224b5a32896c032fb

* Include the filename in both iOS and Android

* Add filename to docs
This commit is contained in:
Edward Smith
2019-06-13 08:24:46 +02:00
committed by Bartol Karuza
parent 829c7bd65a
commit f420cefa77
3 changed files with 12 additions and 6 deletions
@@ -401,7 +401,10 @@ public class CameraRollModule extends ReactContextBaseJavaModule {
int mimeTypeIndex) {
WritableMap image = new WritableNativeMap();
Uri photoUri = Uri.parse("file://" + media.getString(dataIndex));
File file = new File(media.getString(dataIndex));
String strFileName = file.getName();
image.putString("uri", photoUri.toString());
image.putString("filename", strFileName);
float width = media.getInt(widthIndex);
float height = media.getInt(heightIndex);