开发者

Error while updating content to Google sites through API

开发者 https://www.devze.com 2022-12-16 07:14 出处:网络
The 开发者_高级运维code to insert document data works for Google sites but for update it fails.

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,


finally it seemed to work through media content object, i have kept the complete code snippet at http://dsteps.blogspot.com/2010/01/how-to-update-content-through-google.html

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号