{"action":"created","issue":{"url":"https://api.github.com/repos/react-community/react-native-image-picker/issues/646","repository_url":"https://api.github.com/repos/react-community/react-native-image-picker","labels_url":"https://api.github.com/repos/react-community/react-native-image-picker/issues/646/labels{/name}","comments_url":"https://api.github.com/repos/react-community/react-native-image-picker/issues/646/comments","events_url":"https://api.github.com/repos/react-community/react-native-image-picker/issues/646/events","html_url":"https://github.com/react-community/react-native-image-picker/issues/646","id":245631897,"number":646,"title":"Uri issue [Android & IOS]","user":{"login":"nomikeeper","id":10585040,"avatar_url":"https://avatars1.githubusercontent.com/u/10585040?v=4","gravatar_id":"","url":"https://api.github.com/users/nomikeeper","html_url":"https://github.com/nomikeeper","followers_url":"https://api.github.com/users/nomikeeper/followers","following_url":"https://api.github.com/users/nomikeeper/following{/other_user}","gists_url":"https://api.github.com/users/nomikeeper/gists{/gist_id}","starred_url":"https://api.github.com/users/nomikeeper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nomikeeper/subscriptions","organizations_url":"https://api.github.com/users/nomikeeper/orgs","repos_url":"https://api.github.com/users/nomikeeper/repos","events_url":"https://api.github.com/users/nomikeeper/events{/privacy}","received_events_url":"https://api.github.com/users/nomikeeper/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2017-07-26T07:35:48Z","updated_at":"2017-08-16T09:16:46Z","closed_at":"2017-08-03T00:35:54Z","body":"### Description\r\n\r\nI 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.\r\nOn android side: I usually receive URI: \r\n\r\n> \"content://media/external/video/media/212\"\r\n\r\nsomething like this. (Selecting an image or video from gallery and selecting a video just recorded with the camera image-picker provided)\r\nExcept when I select an image just taken by the camera image-picker provided gives me an URI:\r\n\r\n> \"content://com.APPNAME.provider/app_images/Pictures/ImageName.jpg\"\r\n\r\nBasically:\r\n\r\n> Android side\r\n\r\n```\r\nImage from Gallery /URI/ : Working for me\r\nVideo from Gallery /URI/ : Working for me\r\nImage from Camera /URI/ : Not working for me\r\nVideo from Camera /URI/ : Working for me\r\n```\r\n> IOS side\r\n\r\n```\r\nImage from Gallery /URI/ : Working for me\r\nVideo from Gallery /URI/ : Working for me\r\nImage from Camera /URI/ : Working for me\r\nVideo from Camera /URI/ : Not Working for me\r\n```\r\n```\r\nURI: \"content://media/external/video/media/212\" - Works\r\nURI: \"content://com.APPNAME.provider/app_images/Pictures/ImageName.jpg\" - Doesn't work \r\n```\r\n\r\n### Solution\r\n\r\nI'm not so sure if it's a bug or it supposed to be work like that. \r\nMy guess is, second URI is like temporary path. That's why it can't find the media file.\r\n\r\n### Additional Information\r\n\r\n* React Native version: 0.44.0\r\n* React Native Image Picker version: \"^0.26.2\",\r\n* Platform: Both\r\n* Development Operating System: MacOS\r\n* Dev tools: Visual Studio Code.\r\n"},"comment":{"url":"https://api.github.com/repos/react-community/react-native-image-picker/issues/comments/322713656","html_url":"https://github.com/react-community/react-native-image-picker/issues/646#issuecomment-322713656","issue_url":"https://api.github.com/repos/react-community/react-native-image-picker/issues/646","id":322713656,"user":{"login":"nomikeeper","id":10585040,"avatar_url":"https://avatars1.githubusercontent.com/u/10585040?v=4","gravatar_id":"","url":"https://api.github.com/users/nomikeeper","html_url":"https://github.com/nomikeeper","followers_url":"https://api.github.com/users/nomikeeper/followers","following_url":"https://api.github.com/users/nomikeeper/following{/other_user}","gists_url":"https://api.github.com/users/nomikeeper/gists{/gist_id}","starred_url":"https://api.github.com/users/nomikeeper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nomikeeper/subscriptions","organizations_url":"https://api.github.com/users/nomikeeper/orgs","repos_url":"https://api.github.com/users/nomikeeper/repos","events_url":"https://api.github.com/users/nomikeeper/events{/privacy}","received_events_url":"https://api.github.com/users/nomikeeper/received_events","type":"User","site_admin":false},"created_at":"2017-08-16T09:16:46Z","updated_at":"2017-08-16T09:16:46Z","body":"@farhanmannan , I have a workaround. Since normal fetch works fine when it receives a content with \r\nURI: `content://com.APPNAME....` \r\nI decided to use 2 separate fetch depending on the URI I receive. Just use normal fetch comes with react-native when you receive that type of URI and use the `react-native-fetch-blob` fetch in other cases."}}
{"actor":{"display_login":"nomikeeper"}}