Skip to content

Commit

Permalink
Add:: Filename in response object for Android (#1945)
Browse files Browse the repository at this point in the history
  • Loading branch information
AmeyShrivastava authored Nov 19, 2024
1 parent edde9a3 commit 0e208a6
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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) |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
2 changes: 0 additions & 2 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -414,8 +414,6 @@ declare module "react-native-image-crop-picker" {

/**
* Selected image/video's filename.
*
* @platform iOS only
*/
filename?: string;

Expand Down

0 comments on commit 0e208a6

Please sign in to comment.