Download Files with the URL (firebase, Transfer)

Hi i’m building an aplication with Firebase, and i want my users to upload and download any type of file to Direbase storage, the upload is succesfull but im am having problems with downloading files to the device. i’m doing the following:

first i got the download url from firebase -> i’ve done this

then whit that URL i use whit the following code:

    declare var cordova: any;

    download(URL, NAME) {
      const fileTransfer = new Transfer();, cordova.file.dataDirectory + 'NAME').then((entry) => {
        console.log('download complete: ' + entry.toURL());
      }, (error) => {
        // handle error

It says download complete but i can not find the downloaded file, my question is how do i open the file? or how do i move it to a public folder so the user can see it.

PD: I know it says: “You will not see your documents using a file explorer on your device. Use adb:”, but i want the user to be able to see the download file in the explorer of the device.

any ideas



i solve it just by changin cordova.file.dataDirectory to cordova.file.externalRootDirectory

1 Like

I also using that guide but I got error line when I import this=>import { File } from ‘@ionic-native/file’;
can you help me?

Then Can you able to get the file??