diff --git a/README.md b/README.md index 2aaad26f6..9d80db77b 100644 --- a/README.md +++ b/README.md @@ -171,7 +171,7 @@ NOTE: Some of these types may not be available on all iOS versions. Be sure to c | path | string | Selected image location. This is null when the `writeTempFile` option is set to false. | | localIdentifier(ios only) | string | Selected images' localidentifier, used for PHAsset searching | | sourceURL(ios only) | string | Selected images' source path, do not have write access | -| filename(ios only) | string | Selected images' filename | +| filename | string | Selected images' filename | | width | number | Selected image width | | height | number | Selected image height | | mime | string | Selected image MIME type (image/jpeg, image/png) | diff --git a/android/src/main/java/com/reactnative/ivpusic/imagepicker/PickerModule.java b/android/src/main/java/com/reactnative/ivpusic/imagepicker/PickerModule.java index 248f06b8a..adac2856b 100644 --- a/android/src/main/java/com/reactnative/ivpusic/imagepicker/PickerModule.java +++ b/android/src/main/java/com/reactnative/ivpusic/imagepicker/PickerModule.java @@ -692,6 +692,7 @@ private WritableMap getImage(final Activity activity, String path) throws Except image.putString("mime", options.outMimeType); image.putInt("size", (int) new File(compressedImagePath).length()); image.putString("modificationDate", String.valueOf(modificationDate)); + image.putString("filename", new File(path).getName()); if (includeBase64) { image.putString("data", getBase64StringFromFile(compressedImagePath)); diff --git a/index.d.ts b/index.d.ts index ef2a88269..a79369bfb 100644 --- a/index.d.ts +++ b/index.d.ts @@ -414,8 +414,6 @@ declare module "react-native-image-crop-picker" { /** * Selected image/video's filename. - * - * @platform iOS only */ filename?: string;