使用以下代码将附件上传到Google网站,但我收到错误,因为“插入请求必须包含条目”。我使用下面的代码:
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");
请帮忙???
答案 0 :(得分:0)
经过长时间的搜索,我自己修复了它。错误是我使用AtomEntry代替DocumentEntry ... :)