This project has moved and is read-only. For the latest updates, please go here.

Posting Media

Nov 15, 2013 at 5:34 PM
Edited Nov 15, 2013 at 5:39 PM
Hi All ,

I can perfectly post a photo on console but I have a problem on windows phone

 var mediaItems =
                    new List<Media>
                    new Media

                        Data = Utilities.GetFileBytes(""),
                        ContentType = MediaContentType.Jpeg
the problem is on Data Utilities.GetFileBytes();

I would like to choose a photo through the PhotoChooserTask but then i dont know what to put in the GetFileBytes Function

let's say that I have a BitmapImage called LinqImage , how can post this image?

i tried :



but it did not work. What should i put?

Thank you for your help.
Nov 15, 2013 at 6:09 PM

I wrote Utilities.GetFileBytes to make it easy to write console demos. You should write a method to translate your image into a byte[] and assign that to the Data property.

Nov 17, 2013 at 8:29 PM
Edited Nov 19, 2013 at 1:46 PM
Thank you i have found a solution