开发者

Error while uploading atatchment to Google Sites

开发者 https://www.devze.com 2023-03-03 02:01 出处:网络
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:

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

精彩评论

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

关注公众号