未收到“webViewLink”作为回应? [英] Not receiving "webViewLink" in response?
问题描述
从管理控制台开启Google Drive API访问并获取我的客户端ID密钥后,我遵循示例代码(使用Python 2.7),并且可以插入文件夹,设置适当的权限(type = anyone,role = reader),然后将文本/ html类型文件插入到新文件夹中。
然而,我在驱动器服务上执行插入操作时收到的JSON文件资源对象没有 webViewLink'字段!有'webContentLink'和'selfLink'字段,但'静态HTML发布必需的'webViewLink'似乎缺少。
最令人困惑的是。如果此功能尚未打开,或者需要配置我的帐户设置以允许HTML发布,请让我知道。任何其他帮助将是最赞赏的;)
After turning on Google Drive API access from the management console and getting my Client ID keys, I followed the sample code (using Python 2.7) and I am able to insert a folder, set the appropriate permissions (type=anyone,role=reader), and insert a text/html type file into the new folder.
However the JSON file resource objects I receive from executing insert on the drive service have no 'webViewLink' field! There are 'webContentLink' and 'selfLink' fields but 'webViewLink', which is necessary for static HTML publishing, seems to be missing.
Most perplexing. If this feature hasn't been turned on yet or if I need to configure my account settings to allow HTML publishing please let me know. Any other help would be most appreciated ;)
The webViewLink
property is only returned for public folders, and not the single files inside such folders. You can use that as the base url to construct links to your files.
这篇关于未收到“webViewLink”作为回应?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!