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 2018/12/28 13:08:21 UTC

[GitHub] BrainstemStudio commented on issue #201: `fileTransfer.download` is not working in iOS 11.4.1

BrainstemStudio commented 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-450356720
 
 
   @ninexus read the docs here https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-file-transfer/#download
   
   Example:
   
   `/**
    * Download a file example
    * Excepts the parameters: source, target, successCallback, errorCallback, trustAllHosts and options.
    * Options can contain headers as shown below.
    * 
    * source          : The file to download, make sure to "encodeURI"
    * target          : where to save the file locally, use cordova.file for root. See https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-file/
    * successCallback : function to run once the file has downloaded. Passes entry.
    * errorCallback   : function to run if there is an error. Passes error
    * trustAllHosts   : Must be false for production.
    * options         : Support for headers. Authorization or cache control.
    */
   var fileTransfer = new FileTransfer();
   
   fileTransfer.download(
       encodeURI('http://some.server.com/picture.png'),
       cordova.file.dataDirectory+'your-folder/picture.png',
       function(entry) {},
       function(error) {},
       false,
       {
           headers: {
               "if-Modified-Since" : "Wed, 21 Oct 2015 07:28:00 GMT"
           }
       }
   );`

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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