incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brion Vibber (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-622) FileTransfer interface should provide progress monitoring
Date Tue, 24 Jul 2012 23:50:34 GMT

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

Brion Vibber commented on CB-622:
---------------------------------

I've done some further work on this in my filetransfer-progress branch:

https://github.com/brion/incubator-cordova-js/commits/filetransfer-progress
https://github.com/brion/incubator-cordova-android/commits/filetransfer-progress

Also includes an 'abort' method for CB-836.

Adds an 'onprogress' property which can be set to a callback to receive the progress callbacks;
they're internally sent to the success callback, but a wrapper splits them off from the original
caller's callback. These progress events will only be sent if an object id argument was sent
to the upload() method, so people running old JS on new .jar shouldn't get unexpected events.
(Not sure if that's necessary.)

Questions:
* should the 'onprogress' also be settable through filetransfer.addEventListener('progress',
...) or is only an 'onprogress' property the way to go?

Still to do:
* create a ProgressEvent instead of passing through the FileUploadResult on progress events
* implement for iOS, WP7

                
> FileTransfer interface should provide progress monitoring
> ---------------------------------------------------------
>
>                 Key: CB-622
>                 URL: https://issues.apache.org/jira/browse/CB-622
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: Android, BlackBerry, iOS, WP7
>    Affects Versions: 1.7.0
>         Environment: Checked docs for iOS and Android, and in general.
>            Reporter: Brion Vibber
>            Priority: Minor
>              Labels: FileTransfer, file
>
> The FileTransfer upload and download interface seems to provide no way to monitor progress
of the upload/download, other than waiting for the entire transfer to complete or fail.
> Being able to pass another callback for progress monitoring could be a useful interface,
this might get called with a byte count or something.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message