问题描述
我引用了此帖子和此发布,对于如何获取指向Google Doc
的链接仍然一无所知. /p>
根据正式文档 webViewLink
是在相关的Google编辑器或浏览器的浏览器中打开文件的链接".但是,它仅返回null
,而其他属性(例如id或mimeType)则返回期望值. (webContentLink
也会返回null
.)
我可以简单地使用该URL,https://drive.google.com/open?FILE_ID_HERE
,但是我不确定它是否可以在其他人的浏览器中使用.
我将不胜感激!
如果知道Google文档的文件ID,则可以使用以下URL在浏览器中访问文件.
https://drive.google.com/open?id=FILE_ID
与您共享文件的任何人都可以访问该链接.
I referred to this posting and this posting, still clueless as to how to get a link to a Google Doc
.
According to the offical document, webViewLink
is "A link for opening the file in a relevant Google editor or viewer in a browser". However, it doesn't return anything but null
, while other properties, such as id or mimeType, return expected values. (webContentLink
returns null
too.)
I could simply use this URL, https://drive.google.com/open?FILE_ID_HERE
, but I'm not sure this works in other people's browser.
I'd appreciate any advice!
If you know the file ID of a Google Document, you can use the following URL to access the file in the browser.
https://drive.google.com/open?id=FILE_ID
The link will be accessible to anyone with whom you have shared the file.
这篇关于Google Drive API:如何获得指向Google文档的可共享链接? (alternateLink,webViewLink返回null)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!