Opened 15 years ago
Last modified 15 months ago
#4145 new enhancement
[PATCH][RFC] Show upload progress when uploading osmChange
Reported by: | Owned by: | team | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Core | Version: | latest |
Keywords: | upload | Cc: |
Description (last modified by )
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)
Change History (3)
comment:1 by , 15 months ago
Description: | modified (diff) |
---|
by , 15 months ago
Attachment: | 4145.patch added |
---|
comment:2 by , 15 months ago
Summary: | Show upload progress when uploading osmChange → [PATCH][RFC] Show upload progress when uploading osmChange |
---|
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.