I am uploading photo with expo-image-picker and it works okay for IOS but for android it shows the following error message [Unhandled promise rejection: TypeError: Network request failed].
The code is as below
How I set the image values:
setImage({ uri: result.uri, name: `photo.${fileType}`, type:`application/${fileType}`, });
How I append it to formdata
formData.append('file', { uri: image.uri, name: image.name, type: image.type, });
How I send the request to backend:
await axios.fetch("/upload", { formData, method: 'POST', headers: {"Content-Type": `application/json`, },});