This project has moved. For the latest updates, please go here.
1
Vote

Strange values in UploadProgressEventArgs (Flickr.OnUploadProgress)

description

I registered an handler to the OnUploadProgress event and here are the values I got by the end of the upload of a picture (I'm calling Flickr.UploadPicture method):

Values for: BytesSent, TotalBytesToSend and ProcessPercentage

[...]
13500416 / 13815192 / 97
13565952 / 13815192 / 98
13631488 / 13815192 / 98
13697024 / 13815192 / 99
13762560 / 13815192 / 99
13814681 / 13815192 / 99
34 / 13815192 / 0

After the picture seems fully uploaded I always receive a percentage of 0 with a surprisingly low number of BytesSent as the last event notification.

Sample code would be like this:
Flickr flickr = new Flickr();

flickr.OnUploadProgress += this.OnProgressChanged;
flickr.UploadPicture(/* .. */);
And somewhere:
private void OnProgressChanged(object s, UploadProgressEventArgs e)
{
  Console.WriteLine("{0} / {1} / {2}", e.BytesSent, e.TotalBytesToSend, e.ProcessPercentage);
}

comments

samjudson wrote Sep 8, 2014 at 12:09 PM

Hi

I've fixed this in the code. I'll try and release by the end of the week.

Sam

lheyberger wrote Oct 7, 2014 at 10:16 AM

Hello Sam,

I was wondering if you had time to release a new version somewhere?
I saw that the latest released version on codeplex is 3.13 but the latest nuget package is 3.14. Is there anywhere I can get the 3.15 with this fix? ;)

Thank you !

Ludovic.

samjudson wrote Oct 7, 2014 at 10:52 PM

OK, 3.15 is now on NuGet. Let me know if it solves the problem for you.

Sam