mirror of
https://github.com/status-im/react-native-camera-roll.git
synced 2026-08-31 05:11:07 +00:00
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:
committed by
Bartol Karuza
parent
829c7bd65a
commit
f420cefa77
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user