I’m trying to download a file from the server using File Transfer plugin
My issue that get in the console of success function :
download complete: file:///storage/sdcard0/PICTURE.png
but I didn’t find the file in my smartphone ( lenovo VIBE) after doing a research but the file exist I can open it with file opner plugin. But I want that the user can see the downloaded file
this is my code :
import { FileTransfer, FileUploadOptions, FileTransferObject } from '@ionic-native/file-transfer';
import { File } from '@ionic-native/file';
...
const fileTransfer: FileTransferObject = this.transfer.create();
const url = 'https://d30y9cdsu7xlg0.cloudfront.net/png/2048-200.png';
fileTransfer.download(url, this.file.externalRootDirectory + 'PICTURE.png').then((entry) => {
console.log('download complete: ' + entry.toURL());
}, (error) => {
});
}