Skip to content

Commit 0e208a6

Browse files
Add:: Filename in response object for Android (#1945)
1 parent edde9a3 commit 0e208a6

File tree

3 files changed

+2
-3
lines changed

3 files changed

+2
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ NOTE: Some of these types may not be available on all iOS versions. Be sure to c
171171
| path | string | Selected image location. This is null when the `writeTempFile` option is set to false. |
172172
| localIdentifier(ios only) | string | Selected images' localidentifier, used for PHAsset searching |
173173
| sourceURL(ios only) | string | Selected images' source path, do not have write access |
174-
| filename(ios only) | string | Selected images' filename |
174+
| filename | string | Selected images' filename |
175175
| width | number | Selected image width |
176176
| height | number | Selected image height |
177177
| mime | string | Selected image MIME type (image/jpeg, image/png) |

android/src/main/java/com/reactnative/ivpusic/imagepicker/PickerModule.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -692,6 +692,7 @@ private WritableMap getImage(final Activity activity, String path) throws Except
692692
image.putString("mime", options.outMimeType);
693693
image.putInt("size", (int) new File(compressedImagePath).length());
694694
image.putString("modificationDate", String.valueOf(modificationDate));
695+
image.putString("filename", new File(path).getName());
695696

696697
if (includeBase64) {
697698
image.putString("data", getBase64StringFromFile(compressedImagePath));

index.d.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -414,8 +414,6 @@ declare module "react-native-image-crop-picker" {
414414

415415
/**
416416
* Selected image/video's filename.
417-
*
418-
* @platform iOS only
419417
*/
420418
filename?: string;
421419

0 commit comments

Comments
 (0)