Uri issue [Android & IOS]
See original GitHub issueDescription
I realized when you are getting URI directly from camera when you take a picture or record a video, you receive a slightly different URI than you usually do. I’m using react-native-image-picker to pick an image or a video to upload to the server. On android side: I usually receive URI:
“content://media/external/video/media/212”
something like this. (Selecting an image or video from gallery and selecting a video just recorded with the camera image-picker provided) Except when I select an image just taken by the camera image-picker provided gives me an URI:
“content://com.APPNAME.provider/app_images/Pictures/ImageName.jpg”
Basically:
Android side
Image from Gallery /URI/ : Working for me
Video from Gallery /URI/ : Working for me
Image from Camera /URI/ : Not working for me
Video from Camera /URI/ : Working for me
IOS side
Image from Gallery /URI/ : Working for me
Video from Gallery /URI/ : Working for me
Image from Camera /URI/ : Working for me
Video from Camera /URI/ : Not Working for me
URI: "content://media/external/video/media/212" - Works
URI: "content://com.APPNAME.provider/app_images/Pictures/ImageName.jpg" - Doesn't work
Solution
I’m not so sure if it’s a bug or it supposed to be work like that. My guess is, second URI is like temporary path. That’s why it can’t find the media file.
Additional Information
- React Native version: 0.44.0
- React Native Image Picker version: “^0.26.2”,
- Platform: Both
- Development Operating System: MacOS
- Dev tools: Visual Studio Code.
Issue Analytics
- State:
- Created 6 years ago
- Comments:10
Top GitHub Comments
Hey, just found this on rnfFetchBlob issues set cameraRoll to true
Any solutions for this. I am still getting the issue ‘content://’