Network error while Image Upload in expo

I am getting network error when I submit formData to my nodejs server. Also I am getting empty object in request body in my backend server while before submitting when I console.log(formData) in expo, my formData is not empty.

 
 const formData = new FormData();
 const uriParts = imageUri.split('.');
 const fileType = uriParts[uriParts.length - 1];
 formData.append('photo', {
    uri: imageUri,
    name: `photo.${fileType}`,
    type: `image/${fileType}`,
  };

I am using axios!

I simply cleared all data and cache of expo in my mobile and it is working !!!

1 Like

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.