开发者

Error while uploading atatchment to Google Sites

Using the following code to upload an attachment to Google site, but I am getting an error as "Insert requests must contain an entry". I am using the code below:

FileInfo info = new FileInfo("C:\\Bluehills.txt");
FileStream stream开发者_StackOverflow社区 = info.Open(FileMode.Open,FileAccess.ReadWrite,FileShare.ReadWrite);

this.setUserCredentials(userName, password);
Uri postUri = new Uri(makeFeedUri("content"));
// Send the request and receive the response:
AtomEntry insertedEntry = this.Insert(postUri, stream, (string)DocumentTypes["TXT"], "bluehills");

Any help please???


Fixed it myself after long search. Error was I was using AtomEntry in place of DocumentEntry... :)

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜