Frage

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 = 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???

War es hilfreich?

Lösung

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

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top