Quantcast
Channel: Active questions tagged react-native+ios - Stack Overflow
Viewing all articles
Browse latest Browse all 16747

weird image data on react native file upload on iOS

$
0
0
const data = new FormData();
    data.append('photo', {
      name: pic.fileName,
      type: pic.type,
      uri: Platform.OS === 'android' ? pic.uri : pic.uri.replace('file://', ''),
      // data: pic.data,
    });

this is the form data that i am sending to the backend. In the backend multer handles the image.

But i am getting the image data as below, that could not be used to store on the server folder

This is the response i am getting on the server side


Viewing all articles
Browse latest Browse all 16747

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>