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

Andrew Grieve commented on CB-622:
----------------------------------

Again, looking really good Brion! Sorry it took me a while to look again, but I 
should be able to give you quick turn-around times going forward :)

Some more comments:
-Use a HashSet for abortTriggered instead of a map
-Make the AbortException class static and put it at the class level instead of 
nested in a function
-Set the total and lengthComputable fields for download by looking for the 
"Content-Length" response header.
-Tabs vs spaces has been an ongoing issue for our codebase because we have no 
checks in place. You've fallen victim to using both within your changes as 
well. Could you do a replace-all for tabs and change them to 4 spaces?

It would be really great if you could update the mobile-spec FileTransfer tests 
so that it checks that progress events are firing and also add a test that 
ensures that abort works. It's fine that these tests will fail on non-Android 
platforms. This should come before an iOS implementation.

When you're ready for this to be merged, please file pull requests for them 
through github. I don't think we need to wait on iOS before starting these 
merges, but mobile-spec tests would be good. 

Bonus points if you could clean up your commit log before requesting a merge. 
Specifically, splitting up abort vs progress events into distinct commits, and 
beefing up commit descriptions so that one doesn't need to look at the diff to 
know what the commit changed. If you can't figure out the git magic though, we 
would, of course, still love to accept your patch :)

                
> 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
>            Assignee: Andrew Grieve
>            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

        

Reply via email to