I tried to upload some data including an image to server using Axios.
It's working perfectly on iOS, but on Android, it returned Network Error
const data = new FormData();
data.append('tag', tag.METHOD_TAG_UPLOAD_PHOTO);
data.append('app_version', 1);
data.append('os_type', tag.OS_TYPE);
data.append('store_code', kodetoko);
data.append('photo', {
uri: image_picked.uri,
type: 'image/jpeg',
name: judul + ".jpg"
});
I tried to search for solution elsewhere, they said that the problem is within the type of the photo's object, it needs to use image/jpeg type. I'm using it but it still return Network Error. Please help.