After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 529504 - Progress bar should update as image is uploaded
Progress bar should update as image is uploaded
Status: RESOLVED FIXED
Product: postr
Classification: Other
Component: General
git master
Other Linux
: Normal minor
: ---
Assigned To: Postr Maintainers
Postr Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-04-23 08:57 UTC by Ross Burton
Modified: 2010-01-31 02:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
omg upload progress bar! (13.34 KB, patch)
2009-12-05 01:15 UTC, deignacio
none Details | Review
verbose upload progress (13.40 KB, patch)
2009-12-05 13:56 UTC, deignacio
needs-work Details | Review
updated verbose progress (16.01 KB, patch)
2009-12-28 02:35 UTC, deignacio
committed Details | Review

Description Ross Burton 2008-04-23 08:57:26 UTC
This requires hacking on Twisted.
Comment 1 Germán Poo-Caamaño 2008-04-28 16:18:28 UTC
May you elaborate a bit more?

(you never know when a potential contributor will come, and having a bit more information may give them a clue :-)
Comment 2 Ross Burton 2008-04-29 08:54:38 UTC
Postr currently uses the standard Twisted HTTP client code, which doesn't provide progress callbacks.  Copying/subclassing it to provide regular feedback about how much has been uploaded will need to be done.
Comment 3 deignacio 2009-12-05 01:15:08 UTC
Created attachment 149131 [details] [review]
omg upload progress bar!

from the commit message

    the hack is almost too embarassing to detail how it is done
    in the commit message.  if you want to know what is going on
    have to go a step further.
    
    in short, as the image writes bytes out to the socket, update
    a second image-specific progress bar
Comment 4 Francisco Rojas 2009-12-05 13:28:23 UTC
I try upload a photo and throw the following error. 

Traceback (most recent call last):
  • File "/home/frojas/git/postr/src/postr.py", line 526 in on_upload_activate
    self.upload()
  • File "/home/frojas/git/postr/src/postr.py", line 934 in upload
    content_type=content_type, progress_tracker=self.upload_progress_tracker)
  • File "/home/frojas/git/postr/src/flickrest.py", line 219 in upload
    progress_tracker=progress_tracker).addCallback(self.__cb, "upload")
  • File "/home/frojas/git/postr/src/proxyclient.py", line 533 in upload
    proxy=proxy, *args, **kwargs)
  • File "/home/frojas/git/postr/src/proxyclient.py", line 555 in _makeDeferredRequest
    factory = clientFactoryClass(url, *args, **kwargs)
TypeError: __init__() got an unexpected keyword argument 'client_factory_class'

Comment 5 deignacio 2009-12-05 13:56:00 UTC
Created attachment 149153 [details] [review]
verbose upload progress

whoops.  a few typos from a last minute refactoring.  this should work now.

ps.  there's a delay after the progress bar completes and the next photo starts, that's doing things like setting tags and photosets and such.  i could factor those into the progress bar, but am going away for the weekend.  will be back on sunday night.

cheers
Comment 6 Germán Poo-Caamaño 2009-12-15 18:19:03 UTC
Review of attachment 149153 [details] [review]:

There are 2 progress bar. However, when uploading only one photo
the second one looks strange and may be confusing.

On the other hand, when the uploaded is done the progress bar is
still there (I deduce, setting the group and such).

Even the patch looks hacky, may you update it against master?

And thanks for working on this
Comment 7 deignacio 2009-12-28 02:35:49 UTC
Created attachment 150480 [details] [review]
updated verbose progress

i made a few changes:
i decided against adding a second progress bar, and now the bar will fill for the current photo upload, only.
also, 16% of the progress bar is dedicated to the "extra upload steps" that might occur after the actual upload of the photo.  these steps are:  add to photo set, create new photo set (although only one of those are possible at a time), add permissions, send to groups.
Comment 8 deignacio 2010-01-22 22:46:15 UTC
i have been using this patch in my local branch for a long time.  if you are interested, you can either apply it to your own source, or repull/clone from the a github repo i setup to make it easier for me to do development in multiple places 

git://github.com/deignacio/postr.git
Comment 9 Germán Poo-Caamaño 2010-01-31 02:43:15 UTC
Review of attachment 150480 [details] [review]:

Thanks David.  I just committed and also I pulled the other patch in your repo.
Comment 10 Germán Poo-Caamaño 2010-01-31 02:43:43 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.