Hola, soy nuevo en React Native y estaba tratando de llamar a mi API alojada en Heroku, mi código está a continuación:
const path = RNFS.ExternalDirectoryPath + '/newFile.jpg'; const handleUploadFile = async () => { const token = await AsyncStorage.getItem('authtoken') const file = await RNFS.readFile(path, "base64"); let url = `${host}/api/docs/add?card=${value}&number=${myFileId}`; console.log(url); let imageData = { uri: path, type: 'image/jpg', //the mime type of the file name: 'newFile' } let formData = new FormData(); formData.append('file', imageData); const response = await fetch(url, { method: 'POST', mode: 'cors', cache: 'no-cache', credentials: 'same-origin', headers: { 'authtoken': token, 'Content-Type': 'multipart/form-data' }, body: formData }); const output = await response.json(); console.log(output); } Y mientras programaba el lado del servidor probé mi código como 
Pero al llamar a la API desde react-native, recibí el siguiente error: 
Por favor, ayúdame a cargar el archivo.
después de recibir el archivo como base64, debe convertirlo en un archivo y luego puede agregarlo a su formData:
const base64File = await RNFS.readFile(path, "base64"); const blobResult = await fetch(base64File); const file = new File([blobResult], "newFile",{ type: "image/jpg" }); const formData = new FormData(); formData.append('file', file);