-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unable to get filename of an image in android #1078
Comments
Same here.
If we try to hack around it and extract the name from
|
It is working fine for me. I used filnename= path.substring(item.path.lastIndexOf('/') + 1), to get the selected image name from its path |
Hi @NeerajaaG and @ivpusic any solution to this yet? Am getting the following error, when trying to pick an image from download folder. It works Ok in the camera folder It's saying something about exifinterface, and I tried referencing the latest exifinterface from com.android.support (28+) and androidx.exifinterface (1.1.0 beta) in my build.gradle file. Could you help with this? Could this be from the cropping lib used in this package? Error Log08-04 03:55:19.057 6850 6880 I ExifInterface_JNI: Raw image not detected |
@NeerajaaG and @ivpusic you can follow up with progress here. Thanks! |
Is this resolved? still can't get filename on android |
same here, no filename going to use @NeerajaaG method .. |
On iOS the item returned from openPicker:
however for Android we only have:
If we can't get the filename, then the sourceURL is what I think we'd like to use with @NeerajaaG's method. I'm not sure if that is any easier for this package to provide in a future fix... |
+1 |
same problem |
same problem, actually slightly different. Our business needs are to show warning if user selected unsupported file, |
+1 |
because this method returns a string after last '/'. But in your case your file path string ends with 'undefined' |
same here i can't get the file name of the image |
for me, what solved this problem was to apply a patch package, changing a line of the
|
@LuizFelipe16 Could you open a PR so we can all benefit from this fix? 🙏 |
Version
Tell us which versions you are using:
Platform
Tell us to which platform this issue is related
Expected behaviour
file:///storage/emulated/0/Android/data/com.techo2/cache/photo-2009714323
Actual behaviour
file:///storage/emulated/0/Android/data/com.techo2/cache/undefined
Steps to reproduce
Attachments
// stacktrace or any other useful debug info
Love react-native-image-crop-picker? Please consider supporting our collective:
👉 https://opencollective.com/react-native-image-crop-picker/donate
The text was updated successfully, but these errors were encountered: