Open minhchu opened 7 years ago
can you add .catch and check if you get error when you select for the second time?
Thanks for your quick reply. I tried but it didnt catch anything.
what if instead of alert you put console.log?
It is working as expected.
Still dont know why alert
didnt work
Thank you.
Hi @ivpusic , I have the same problem. When I can only pick 1 image, after select the first the component response with an array with one item, it doesn't catch anything beacause it is working fine but only responding with one image.
Here is my code:
ImagePicker.openPicker({ width: 400, compressImageMaxWidth: 400, height: 400, compressImageMaxHeight: 400, multiple: true, includeBase64: true, maxFiles: 10, mediaType: 'photo' }).then(res => { console.log('res', res); if(res) { let results = [] res.map((image, index) => { if(index < 10) results.push({isStatic: true , uri: image.path, data: 'data:image/jpeg;base64,' + image.data}) }) this.setState({images: results}) } }).catch(error => { console.log('ImagePicker error', error); });
I have the same problem: on android it's working but on ios it's working just the first time then it's not working anymore and I can't catch anything @sergiocloud how did u solve it?
I have set an Alert inside the ImagePicker's promise asking the user if want to upload more pictures, if yes I call the function again. Every result is pushing in an array.
It's not the best option but I'm busy for searching other method...
I have the same problem
+1 maxFiles not working on android device. "react-native": "^0.47.2", "react-native-image-crop-picker": "^0.21.1", pls support android 👯 . tks. @ivpusic
Same here. the first time it works, the second time codes in then block do not work!
Any progress on this? Only works once. Second time, camera shows for a sec and then disappears. Same with gallery. Can you help me?
Same error. Any work around for this issue?
Same error. Any work around for this issue?
Any progress on this? Only works once. Second time, camera shows for a sec and then disappears. Same with gallery. Can you help me?
Did you find any solution buddy?
Same error. Any work around for this issue?
For me the problem was that the open camera button was in modal. to solve this, I close the modal first and then added setTimeOut of 3 seconds before opening camera or picker.
Stuck on the same issue, do you guys get any solution ? For the first time it works and when you cancel the the gallery popup and again try to open it will stuck on that code and do nothing.
Stuck on the same issue, do you guys get any solution ? For the first time it works and when you cancel the the gallery popup and again try to open it will stuck on that code and do nothing.
timeout usually works the best, 500 is enough that user wont find it frustrating
Version
Tell us which versions you are using:
Platform
Tell us to which platform this issue is related
Expected behaviour
I have a button like this:
The first time I click on the button and select an image, it works and the alert popup is shown. After that, I still can pick an image but there is no popup anymore.
Did I do anything wrong or there is a real bug ?
Thank you.