Results 1 to 3 of 3

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

  1. #1
    Sencha Premium Member
    Join Date
    Jul 2012
    Posts
    27
    Answers
    2
    Vote Rating
    0
      0  

    Default 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
    623
    Answers
    67
    Vote Rating
    29
      0  

    Default

    Are you sure FileTransfer class is loaded at that time?

  3. #3
    Sencha Premium Member
    Join Date
    Jul 2012
    Posts
    27
    Answers
    2
    Vote Rating
    0
      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.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •