Hi,

i'm trying to handle Picasa web albums API, and i managed to realize
most of the function that i wanted.

But i still can't upload a new photo, i got the following error :

java.io.IOException: Error writing request body to server
        at sun.net.www.protocol.http.HttpURLConnection
$StreamingOutputStream.checkError(Unknown Source)
        at sun.net.www.protocol.http.HttpURLConnection
$StreamingOutputStream.write(Unknown Source)
        at java.io.BufferedOutputStream.flushBuffer(Unknown Source)
        at java.io.BufferedOutputStream.write(Unknown Source)
        at com.google.gdata.data.media.MediaSource$Output.writeTo
(MediaSource.java:88)
        at com.google.gdata.data.media.MediaBodyPart
$MediaSourceDataHandler.writeTo(MediaBodyPart.java:74)
        at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:1403)
        at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:874)
        at javax.mail.internet.MimeMultipart.writeTo(MimeMultipart.java:444)
        at com.google.gdata.client.media.MediaService.insert
(MediaService.java:330)
        at com.orangeVallee.rosebud.service.picasa.Picasa.addPhoto
(Picasa.java:171)
        at com.orangeVallee.rosebud.service.picasa.PicasaUtilities.main
(PicasaUtilities.java:52)


My code look like this (just a part) :


PhotoEntry myPhoto = new PhotoEntry();
myPhoto.setTitle(new PlainTextConstruct("test"));
myPhoto.setDescription(new PlainTextConstruct("test description"));
myPhoto.setClient("myClientName");

MediaFileSource myMedia = new MediaFileSource(new File(filename),
"image/jpg");
myPhoto.setMediaSource(myMedia);

PhotoEntry returnedPhoto = myService.insert(albumPostUrl, myPhoto);


("albumPostUrl" is the feed url for the album, and "filename" the
local path of photo)

Any thing i missed?

--~--~---------~--~----~------------~-------~--~----~
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