Modify

Opened 13 years ago

#4145 new enhancement

Show upload progress when uploading osmChange

Reported by: avarab@… Owned by: team
Priority: normal Milestone:
Component: Core Version: latest
Keywords: upload Cc:

Description

When JOSM uploads osmChange data it doesn't show a progress bar. This could be implemented by counting the number of bytes of the osmChange request that have been successfully sent over
the wire.

I looked at the relevant code in JOSM once but I couldn't find a way
to do it (but I'm not familiar with Java). In Perl with
HTTP::Request::Common you can do e.g.:

    $HTTP::Request::Common::DYNAMIC_FILE_UPLOAD = 1
    my $req = HTTP::Request::Common->new( ... );
    $req->content( sub {
        my $chunk = &$gen();
        my $length = length $chunk;

        warn "I'm now uploading a chunk of length $length, of a total
of $total bytes";

        return $chunk;
     } );
     my $result = LWP::UserAgent->request( $req );

(See this code for a practical example of this that I wrote:
http://cpansearch.perl.org/src/CPB/Flickr-Upload-1.32/Upload.pm)

I presume Java has some library to do this as well but I couldn't find it.

Attachments (0)

Change History (0)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set.
to The owner will be changed from team to the specified user.
The owner will change to avarab@gmail.com
as duplicate The resolution will be set to duplicate.The specified ticket will be cross-referenced with this ticket
The owner will be changed from team to anonymous.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.