cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Davide (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (CB-10254) file-transfer for windows platform broken
Date Thu, 24 Dec 2015 11:11:49 GMT

    [ https://issues.apache.org/jira/browse/CB-10254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15070889#comment-15070889
] 

Davide edited comment on CB-10254 at 12/24/15 11:10 AM:
--------------------------------------------------------

Like below?

upload: function (server, filePath, options, trustAllHosts) {
        var q = $q.defer();
        var ft = new FileTransfer();
        var uri = (options && options.encodeURI === false) ? server : encodeURI(server);

        if (options && options.timeout !== undefined && options.timeout !==
null) {
          $timeout(function () {
            ft.abort();
          }, options.timeout);
          options.timeout = null;
        }

        ft.onprogress = function (progress) {
          q.notify(progress);
        };

        q.promise.abort = function () {
          ft.abort();
        };

        ft.upload(filePath, uri, q.resolve, q.reject, options, trustAllHosts);
        return q.promise;
      }


was (Author: perfectioncsgo):
Like below?

bq.
upload: function (server, filePath, options, trustAllHosts) {
        var q = $q.defer();
        var ft = new FileTransfer();
        var uri = (options && options.encodeURI === false) ? server : encodeURI(server);

        if (options && options.timeout !== undefined && options.timeout !==
null) {
          $timeout(function () {
            ft.abort();
          }, options.timeout);
          options.timeout = null;
        }

        ft.onprogress = function (progress) {
          q.notify(progress);
        };

        q.promise.abort = function () {
          ft.abort();
        };

        ft.upload(filePath, uri, q.resolve, q.reject, options, trustAllHosts);
        return q.promise;
      }

> file-transfer for windows platform broken
> -----------------------------------------
>
>                 Key: CB-10254
>                 URL: https://issues.apache.org/jira/browse/CB-10254
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin File Transfer
>    Affects Versions: 3.5.0
>         Environment: Windows Phone 8.1, Nokia Lumia 520
>            Reporter: Davide
>            Priority: Blocker
>         Attachments: FTTest.zip
>
>
> Only been able to test this on a Nokia Lumia 520. The current implementation of BackgroundTransfer
uploads will almost always stay on pending indefinately, which means that there may never
be a callback unless the operation is manually canceled.
> Notably, this is also an issue with a multitude of things. When disabling apps running
in the background and also disabling time and date synchronization, this problem may not always
occur.
> Perhaps it's a bug in BackgroundTransfer itself?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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


Mime
View raw message