问题描述
downloadUrl 的引用表明该链接存在的时间很短.这个大概多长时间?分钟、小时、天?
The reference for downloadUrl states that the link exists for a short amount of time. How long is this roughly? Minutes, hours, days?
https://developers.google.com/drive/v2/reference/文件#downloadUrl
推荐答案
我不会依赖这个 URL 超过几分钟或几小时,但实际上它目前稳定一天左右.这可能会发生变化,因此最好在下载前直接获取 URL.
I would not rely on this URL for more than minutes or hours, but in reality it is currently stable for a day or so. This is subject to change, so best to get the URL directly before downloading.
这个 downloadURL
和 webContentLink
的区别在于 webContentLink
使用来自用户浏览器 cookie 的授权,即 downloadURL
需要经过授权的 API 请求(使用 OAuth 2.0).
The difference between this downloadURL
and the webContentLink
is that the webContentLink
uses authorization from the user's browser cookie, the downloadURL
requires an authorized API request (using OAuth 2.0).
这篇关于Google Drive SDK“短命"多久?下载网址存在吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!