背景
我目前正在使用Google Drive/Docs实施应用程序。使用最新的库,我正在上传图像,将Google Drive作为图像库。Google DocumentsList API - 以编程方式设置描述
问题
我想能够设置在谷歌驱动器的每个项目相关联的描述字段。上传工作正常,我无法使描述字段正常工作。
我可以看到在此post中提到的修改已被集成到最新的库中,所以DocumentEntry
类现在有一个Description
成员。
将此新成员设置为文本时我希望在Google Drive中插入文件时引发(400) Bad Request
错误。完整的错误是:
<errors xmlns='http://schemas.google.com/g/2005'>
<error>
<domain>GData</domain>
<code>ParseException</code>
<internalReason>[Line 3, Column 42, element docs:description] Unknown attribute: 'value' </internalReason>
</error>
<error>
<domain>GData</domain>
<code>ParseException</code>
<internalReason>Unknown attribute: 'value' </internalReason>
</error>
</errors>
我一直在使用.Summary
以及.Content.Content
,但没有结果尝试。守则的什么,我想实现一个例子:
DocumentEntry entry = new DocumentEntry();
entry.Title.Text = "Test Upload";
entry.Description = "Tag1, Tag2"; // Once I set this I get the error
entry.Summary.Text = "Tag3, Tag 4"; // This doesn't do anything!
问题
经验的人的任何援助都这样做,或者寻找到它之前,将不胜感激。
是否有人成功实施了此功能?或者,Google API的限制是客户无法控制的吗?
非常感谢Claudio。我已经检出了最新的图书馆资源,编译完成,现在所有的工作都按预期工作。 – kelfish