Hi,

I am uploading a zip file from my client to my web server.  On web
server I am extracting image content and uploading Via Google Picasa
API.  as there is no support for bytes, I am first converting each
entry into MemoryStream and passing to PicasaEntry object. I am
getting 400 Bad request error.


        public string UploadImage(byte[] imageBytes_, string
imageName_)
        {
            string url = string.Empty;
            try
            {
                PicasaEntry newPhoto = null;
                MemoryStream ms = new MemoryStream();
                ms.Write(imageBytes_, 0, imageBytes_.Length);
                if (_albumFeed != null)
                {
                    PicasaEntry photoEntry = new PicasaEntry();
                    photoEntry.MediaSource = new MediaFileSource(ms,
imageName_, GetContentType(imageName_));

                    newPhoto = this._service.Insert<PicasaEntry>(new
Uri(this._albumFeed.Post), photoEntry);
                }

                url = newPhoto.FeedUri;

            }

-- 
You received this message because you are subscribed to the Google Groups 
"Google Picasa Web Albums API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-picasa-data-api?hl=en.

Reply via email to