Error of Upload Photo Filesize was zero

Topics: Developer Forum, Project Management Forum, User Forum
Apr 4, 2012 at 9:41 AM

HI,

I am working on WP7, I get the stream like this:

private void photoChooser_Completed(object sender, PhotoResult e)
        {
            try
            {
                if (e.TaskResult == TaskResult.OK)
                {
                   
                    BitmapImage bitmap = new BitmapImage();
                    bitmap.SetSource(e.ChosenPhoto);
                    this.UploadImage.Source = bitmap;

                  //this is the stream I get.
                  uploadSelectViewModel.Stream = e.ChosenPhoto;
                }
            }
            catch (Exception a)
            {
                MessageBox.Show(a.ToString());
            }

        }

and use it like this:

 flickr.UploadPictureAsync(this.Stream,"Bean", this.PhotoTitle, this.Description, this.Tags, true, true, true, ContentType.Photo, SafetyLevel.None, HiddenFromSearch.None, (callback) =>
            {
                if(callback.HasError == true)
                {
                    Deployment.Current.Dispatcher.BeginInvoke(() => {
                        MessageBox.Show(callback.ErrorMessage.ToString());
                    });
                    //MessageBox.Show("s");
                }
                else
                {
                   // MessageBox.Show("nihao");
                }

            });

 

and it report this error, could  you please help me to figure out this error?

 

thanks.

Coordinator
Apr 4, 2012 at 9:45 AM

Why post twice?

Apr 4, 2012 at 9:51 AM

sorry, I will delete the reply. thank you very much.

Apr 4, 2012 at 11:40 AM

solution is here:http://flickrnet.codeplex.com/discussions/347865

 

Thanks for the help from samjudson;