I am trying to send an audio file with the library here and everything is fine, record, stop and play the audio, but when I try to send this audio file by formdata, the file breaks.
Here is my code:
formData.append("data[file_name]", { uri: this.state.uriAudio, name: Platform.OS === 'android' ? 'test.mp4' : 'test.m4a', type: Platform.OS === 'android' ? 'audio/mp4' : 'audio/m4a',})
but when the file arrives, the audio file format changes and these are the results I get:
"file": {"url": "http://.......","name": "test.m4a","content_type": "audio/x-m4a","upload_date": "Dec 5, 2018","size": "3 MB" }
When I try to play the audio, the format is broken.
Thanks in advance