C# 4.0 谷歌文档。我需要编辑带有公共链接c的文档#
谷歌文档。我需要用c#编辑一个带有puplic链接的文档。还有吗C# 4.0 谷歌文档。我需要编辑带有公共链接c的文档#,c#-4.0,google-docs-api,C# 4.0,Google Docs Api,谷歌文档。我需要用c#编辑一个带有puplic链接的文档。还有吗 FileStream fs = FileStream("C:\*****.jpg", FileMode.Open); DocumentEntry entry2 = service.Update(new Uri(strAlternateUriComesFromServer), fs, "text/plain", null) as DocumentEntry; 这段代码给出了一个错误。如何编辑公共文档 我只获得了共享文档链接,需
FileStream fs = FileStream("C:\*****.jpg", FileMode.Open);
DocumentEntry entry2 = service.Update(new Uri(strAlternateUriComesFromServer), fs, "text/plain", null) as DocumentEntry;
这段代码给出了一个错误。如何编辑公共文档
我只获得了共享文档链接,需要更新它。如果您知道文档名称或资源ID,并且该文档与您共享,并且您具有正确的读/写访问权限(ACL),那么更新资源应该不会有任何问题 通常,使用Google Documents API更新文档的过程如下:
// Public Link contains the resourceID
// example: https://docs.google.com/file/d/097iZigwrANhGTElvZDdCVmlZNzQ/edit
// resourceID: 097iZigwrANhGTElvZDdCVmlZNzQ
// Get Your Document Entry
string editUri = "http://docs.google.com/feeds/documents/private/full/%3A" + resourceID;
DocumentEntry docEntry = (DocumentEntry)service.Get(editUri);
这段代码非常有效。thanx寻求帮助。您必须向我们提供更多有关您所做的工作以及您面临的问题的详细信息。我希望这足够了:)我只有公共链接。我有读/写权限(ACL)。我没有文件和帐户信息。需要更新文档。我可以用internet explorer编辑它。在c#@Yusuf terzi中有什么方法可以看到我在上面的编辑。我无法在评论部分获得正确的格式。
string editUri = "https://docs.google.com/feeds/default/private/full/file%3A" + resId;
DocumentEntry docEntry = (DocumentEntry)dsServ1.Get(editUri);
docEntry.Title.Text = strNewName;
docEntry.MediaSource = new MediaFileSource("C:\\new.txt", "text/plain");
ResumableUploader uploader = new ResumableUploader();
// Start the update process.
ClientLoginAuthenticator oa = new ClientLoginAuthenticator("Komote", ServiceNames.Documents, strUsername, strPassword);
uploader.UpdateAsync(oa, docEntry, new object());