Audio Not Uploding return error [Error: Network Error]
hello gays
I'm facing the issue when uploading the audio on the server it returns me network error every I try multiple things to solve this but till not working
here is my code to select the audio file
const results = await DocumentPicker.pick({ type: [DocumentPicker.types.audio] }) console.log('res : ' + JSON.stringify(results)); console.log('URI : ' + results.uri); console.log('Type : ' + results.type); console.log('File Name : ' + results.name); console.log('File Size : ' + results.size);
and here is the code to upload audio fille
var formdata = new FormData()
formdata.append(audio_name, audioName)
formdata.append(company, com_id)
formdata.append(audio_file, {
uri: audioPath,
name: audioFileName,
type: audioType
})
return Axios({ url: URL.base_url + url, method: 'POST', data: formdata, headers:{ Accept: 'application/json', 'Content-Type': 'multipart/form-data',} }).then(res => { return res.data }).catch((e) => console.log('POST Method Error => ', e))
till I got this error
'POST Method Error => ', { [Error: Network Error]
│ config:
│ { url: 'https://
I tried commenting on Flipper or update the flipper version
help me
i also get this error, than i update the flipper version and it's solved or you can remove the flipper https://github.com/facebook/flipper/issues/1326#issuecomment-653470251
thanks i already remove that and now it's working fine
On Tue, Nov 17, 2020 at 8:28 PM Irsyaad Budi [email protected] wrote:
i also get this error, than i update the flipper version and it's solved or you can remove the flipper facebook/flipper#1326 (comment) https://github.com/facebook/flipper/issues/1326#issuecomment-653470251
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/rnmods/react-native-document-picker/issues/357#issuecomment-728983990, or unsubscribe https://github.com/notifications/unsubscribe-auth/AREKPEOVZTBNJLQZUYNTYALSQKFSRANCNFSM4TJV72WA .
-- Shivani Topiwala Mobile App Developer
In my case it was an issue of mimeType