You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2019/03/14 06:22:17 UTC

[GitHub] [cordova-plugin-file-transfer] santhoshbabu-d edited a comment on issue #201: `fileTransfer.download` is not working in iOS 11.4.1

santhoshbabu-d edited a comment on issue #201: `fileTransfer.download` is not working in iOS 11.4.1
URL: https://github.com/apache/cordova-plugin-file-transfer/issues/201#issuecomment-472719491
 
 
   Download File is corrupted in the Android , installed plugin today
   
   import { FileTransfer ,FileTransferObject} from '@ionic-native/file-transfer/ngx';
   import { File } from '@ionic-native/File/ngx';
   
   constructor( private transfer: FileTransfer, private file: File,...)
   
   download(){
       let downloadUrl = encodeURI('https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf');
       let path = 'cdvfile://localhost/persistent/Download/';
       const transfer = this.transfer.create();
       transfer.download(downloadUrl, path + 'dummy.pdf').then(entry => {
         let url = entry.toURL();
      console.log('File url\n' + url);
       }, (error) => {
         // handle error
         console.log("download error source " + error.source);
         console.log("download error target " + error.target);
         console.log("download error code" + error.code);
       });
   }

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org