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... :)
精彩评论