Drive API v3恢复以前版本的文件 [英] Drive API v3 restore previous version of file

查看:128
本文介绍了Drive API v3恢复以前版本的文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Dropbox拥有一个恢复API端点以恢复文件更早版本。如何使用Google Drive REST API v3做同样的事情?也就是说,将Google Drive中的文件恢复到其早期版本。

使用< href =https://developers.google.com/drive/v3/reference/revisions/delete =nofollow noreferrer> https://developers.google.com/drive/v3/reference/revisions/delete



例如,您有一个包含修订的文件: -


9

7



5



4

3

<1>

并且您想要恢复修订版本5,则必须删除修订版本9和7


Dropbox has an restore api endpoint to restore a file to an earlier version. How does one do the same thing using the Google Drive REST API v3? That is, restore a file in Google Drive to its earlier version.

解决方案

You restore a revision by deleting all later revisions using https://developers.google.com/drive/v3/reference/revisions/delete

So eg, You have a file with revisions:-

9

7

5

4

3

1

and you want to restore revision 5, you must delete revisions 9 and 7

这篇关于Drive API v3恢复以前版本的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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