Modify

Opened 15 years ago

Last modified 15 months ago

#4145 new enhancement

[PATCH][RFC] Show upload progress when uploading osmChange

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

Description (last modified by taylor.smock)

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 (1)

4145.patch (1.9 KB ) - added by taylor.smock 15 months ago.

Download all attachments as: .zip

Change History (3)

comment:1 by taylor.smock, 15 months ago

Description: modified (diff)

I don't know if it is worth it to try and show users this information; when I was testing against the dev API, a 10k object changeset was ~104kb. I don't know if there is any internet that people use where that would take a significant amount of time anymore (14 years after this ticket was opened).

According to speedtest.net, Cuba has the lowest median internet speeds, and they can upload at ~.84 Mbps. For the sake of argument, let us assume that a standard citizen in Cuba gets .5 Mbps uploads. This takes <1s to upload 104kb.

by taylor.smock, 15 months ago

Attachment: 4145.patch added

comment:2 by taylor.smock, 15 months ago

Summary: Show upload progress when uploading osmChange[PATCH][RFC] Show upload progress when uploading osmChange

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from team to the specified user.
Next status will be 'needinfo'. The owner will be changed from team to avarab@….
as duplicate The resolution will be set to duplicate. Next status will be 'closed'. The specified ticket will be cross-referenced with this ticket.
The owner will be changed from team to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.