Google Drive SDK“短命"多久?下载网址存在吗? [英] How long does the Google Drive SDK "short lived" download URL exist for?

查看:11
本文介绍了Google Drive SDK“短命"多久?下载网址存在吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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.

这个 downloadURLwebContentLink 的区别在于 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“短命"多久?下载网址存在吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆