The code to insert document data works for Google sites but for update it fails.
I tried below two calls
1
entry.setMediaSource(ms);
gives following
//IllegalArgumentException: Cannot set media source on entry with existing non-MediaContent
2
service.updateMedia(new URL(getContentFeedUrl()), newAttachment);
gives
//com.google.gdata.util.InvalidEntryException,Invalid request URI
service is sites service object, entry is attachment entry
Let me know if you need more info,