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, 01 May 2012 22:28:52 GMT

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

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

I don't think FileTransfer is actually part of W3C's FileAPI ... it feels very PhoneGappy
in how it takes two callbacks and has a couple extra paramaeters tacked on. :)

I think the FileAPI-friendly way of doing this is to pass File or Blob objects into a FormData
object, then send that into an XMLHTTPRequest: https://developer.mozilla.org/En/XMLHttpRequest/Using_XMLHttpRequest#Using_FormData_objects

This seems to live in the XMLHttpRequest2 spec: http://www.w3.org/TR/XMLHttpRequest2/#interface-formdata

This also would sidestep FileTransfer-specific feature requests like:
https://issues.apache.org/jira/browse/CB-51 (support PUT as well as POST)
https://issues.apache.org/jira/browse/CB-52 (HTTP basic auth)
https://issues.apache.org/jira/browse/CB-200 (support uploading multiple files in one request)

since all those things can be done with FormData+XHR.

... there may already be native FormData implementations in the WebKit available (confirmed
it claims to be there in iOS 4.3, iOS 5.1, and Android 4.0.2) so I don't know how hard it
would be to supplement them or make them interact with other objects.
                
> FileTransfer interface should provide progress monitoring
> ---------------------------------------------------------
>
>                 Key: CB-622
>                 URL: https://issues.apache.org/jira/browse/CB-622
>             Project: Apache Callback
>          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
>              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