1. #1
    Sencha Premium Member
    Join Date
    Jul 2012
    Posts
    27
    Vote Rating
    0
    Answers
    2
    squistbe is on a distinguished road

      0  

    Default Unanswered: FileTranser.download not working with sencha touch + phonegap.

    Unanswered: FileTranser.download not working with sencha touch + phonegap.


    I have been successful in uploading a file using the FileTransfer.upload() command to upload a file to a server. I have not been able to get the download command to work. Here is my code:

    Code:
    var fileTransfer = new FileTransfer(),
                  uri = encodeURI('myURI');
                  
              fileTransfer.download(uri, LocalFileSystem.PERSISTENT,
                function(entry) {
                  console.log("download complete: " + entry.fullPath);
                },
                function(error) {
                  console.log("download error source " + error.source);
                  console.log("download error target " + error.target);
                  console.log("upload error code" + error.code);
                }
              );
    The example on the Apache Cordova website seems very straight forward, but I seem to be missing something obvious.

  2. #2
    Sencha User bluehipy's Avatar
    Join Date
    Mar 2010
    Location
    Romania
    Posts
    612
    Vote Rating
    28
    Answers
    67
    bluehipy will become famous soon enough bluehipy will become famous soon enough

      0  

    Default


    Are you sure FileTransfer class is loaded at that time?

  3. #3
    Sencha Premium Member
    Join Date
    Jul 2012
    Posts
    27
    Vote Rating
    0
    Answers
    2
    squistbe is on a distinguished road

      0  

    Default


    I think it has been loaded. I am doing all this code from a view. My upload code is done in a controller.

Thread Participants: 1

Tags for this Thread