Skip to content
This repository has been archived by the owner on Aug 21, 2020. It is now read-only.

Android: Could not retrieve file for uri /data/user/0/com.babyshow/files/gougou.aac #125

Closed
hyq2015 opened this issue Dec 4, 2016 · 7 comments

Comments

@hyq2015
Copy link

hyq2015 commented Dec 4, 2016

after I recorded the audio,audio can play by the method AudioRecorder.playRecording(),
but when I try to upload the audio to server,there is an error:Could not retrieve file for uri /data/user/0/com.babyshow/files/gougou.aac

this is weird, I have set the correct audio path by : let audioPath = AudioUtils.DocumentDirectoryPath +'/gougou.aac'; seems like the audio file dose not save in the audioPath.
waitting for your kindly answer,tks!

@gxhx
Copy link

gxhx commented Dec 5, 2016

Ah, i have the same problem

@gxhx
Copy link

gxhx commented Dec 6, 2016

#107 issue fix it!
when you upload, path should be => 'file://' + AudioUtils.DocumentDirectoryPath + 'test.aac'. On Android, you must add file://.

@hyq2015
Copy link
Author

hyq2015 commented Dec 6, 2016

cheers! it works! thank you~

@hyq2015 hyq2015 closed this as completed Dec 6, 2016
@anikasetia
Copy link

Hi, I am facing the same issue, I used the solution proposed. On prepending 'file://' to the path I am facing this error "Value for uri cannot be cast from ReadableNativeMap to String". Can anyone help me out with this?

@fahadjabbar8
Copy link

If you are hard coding a uri it will give the same error even though the path is valid. it should be a variable!

@tlweiii6465
Copy link

hi after i added 'file://' + AudioUtils.DocumentDirectoryPath + 'test.aac' for post .acc file to my server it was success upload but the .acc inside my server was crash is that any solution? this issue is only occur in android

@rishabhrathod01
Copy link

hi after i added 'file://' + AudioUtils.DocumentDirectoryPath + 'test.aac' for post .acc file to my server it was success upload but the .acc inside my server was crash is that any solution? this issue is only occur in android

".acc" ? make sure it is ".aac" while sending it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants