Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70764

How to access the file saved in the externalDataDirectory Ionic4

$
0
0

@kendam wrote:

I am trying to access the file I downloaded with fileTransfer plugin into the externalDataDirectory, I can see the file there from my file manager . When I console log the return full path of the file I am able to see something like this

file:///storage/emulated/0/Android/data/<my-app-id>/files/<my-files>

but then when I try to preload the file audio.native like this

      this.nativeAudio.preloadComplex('uniqueId', this.file.externalRootDirectory+`${myPath}`, 1, 1, 1).then(this.onPreloadSucess, this.onPreloadError);

I got a not found exception because a www was prepended to the path like this

www/file:///storage/emulated/0/Android/data/<my-app-id>/files/<my-files>

I also try to resolve the path, but got the same result.

How do I handle this.

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 70764

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>