jeanpan / react-native-camera-roll-picker

📷 A React Native component providing images selection from camera roll
https://www.npmjs.com/package/react-native-camera-roll-picker
MIT License
423 stars 176 forks source link

assets-library path giving problem while uploding to the server #36

Open koneriranjith opened 7 years ago

koneriranjith commented 7 years ago

While uploading image to the server it seems this path is not acceptable. Any solution to get document directory path in uri

{ "uri":"assets-library://asset/asset.JPG?id=AC072879-DA36-4A56-8A04-4D467C878877&ext=JPG", }

amitbravo commented 7 years ago

which uploading dependancies you using ? I got same problem, trying to sort it out .

koneriranjith commented 7 years ago

Image uploading work's fine. I'am using XMLHttpRequest() to uploading videos, but it's uploading thumbnail image not actual path. I posted here you can take reference -http://stackoverflow.com/questions/42575526/react-native-uploaded-video-it-saves-like-image

nakulkundaliya commented 7 years ago

Hello @koneriranjith and @amitbravo I have fixed this issue. costomize RCTCameraRollManager.m file https://github.com/nakulkundaliya/react-native-camera-roll-picker I hope its work for you

rodrigoreis22 commented 6 years ago

Using FormData to send the POST request seems to work only with a file:// uri format.. has anyone figured this out?

rodrigoreis22 commented 6 years ago

@nakulkundaliya what's the fix you made? I couldn't find the commit on your fork repo..

nakulkundaliya commented 6 years ago

@rodrigoreis22 You have two way to fix this issue. 1. you can write native code for write assets uri into temp folder other wise 2. you can user lib for convert assets url to file url.

rodrigoreis22 commented 6 years ago

I ended up using https://github.com/wkh237/react-native-fetch-blob