GNOME Bugzilla – Bug 529504
Progress bar should update as image is uploaded
Last modified: 2010-01-31 02:43:43 UTC
This requires hacking on Twisted.
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 :-)
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.
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
I try upload a photo and throw the following error. Traceback (most recent call last):
+ Trace 219460
self.upload()
content_type=content_type, progress_tracker=self.upload_progress_tracker)
progress_tracker=progress_tracker).addCallback(self.__cb, "upload")
proxy=proxy, *args, **kwargs)
factory = clientFactoryClass(url, *args, **kwargs)
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
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
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.
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
Review of attachment 150480 [details] [review]: Thanks David. I just committed and also I pulled the other patch in your repo.
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.