Search code examples
react-nativeprivacy

Is it safe to send file to server?


I'm creating a react native app that transform audio to text.

First, a user records the audio. Then the recording is sent with RNFS.uploadFiles to flask API. This flask API I created to convert the audio file into text and send back the text to the user.

Honestly, I'm not sure how it really works. For example, I don't see the audio files that were sent from react native to flask server. They are not saved in my server (or they are?) Should I encrypt the recordings before they are sent?

I send audio with this function:

 RNFS.uploadFiles({
    toUrl: uploadUrl,
    files: fileToSend,
    method: 'POST',
    headers: {
      'Accept': 'application/json',
    }
  }).promise.then((response) => {
   setResults(response.body)
    })
    .catch((err) => {
      console.log(err)
    });
  }
}

Solution

  • To see the audio files sent from your application to the Flask server, you can use an HTTP Debugging tool such as Charles Proxy or Fiddler. This will show you the HTTP requests exchanged.

    If your Flask server has SSL enabled (HTTPS) and your React Native is connecting through HTTPS, then the communication is already encrypted.