Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
downloadUrl 的参考说明该链接存在的时间很短。这个大概多长时间?分钟、小时、天?
https://developers.google.com/drive/v2/reference/files#downloadUrl
我不会依赖这个 URL 超过几分钟或几小时,但实际上它目前稳定了一天左右。这可能会发生变化,因此最好在下载前直接获取 URL。
downloadURL编辑:这和之间的区别在于webContentLink使用webContentLink来自用户浏览器cookie的授权,downloadURL需要授权的API请求(使用OAuth 2.0)。
downloadURL
webContentLink