Currently I am stuck in a problem, which i am not able to solve, i hope some one help.
I have made a react native application in which i have used react-native-image-picker
package to upload the image to the server.
The image uploading works fine on android but whenever i try to upload the image via IOS emulator the application closes and no error is generated on console.I wondering why its happening.
I am submitting a request to localhost via form
Here is my code
formdata.append('file', { uri: imageResponse.uri, name: fileName, type: imageResponse.type }) axios.post(url, formdata, { headers: {"Content-Type": "multipart/form-data" } }).then((response) => { var dataObj = response.data; newMessage[0].text = JSON.stringify(dataObj.data) if(screenType == 'group') { this.postGroupChat(newMessage, 2) }else { this.postChat(newMessage, 2) } }) .catch((error) => { console.log(5555, error) });