PyDrive2 icon indicating copy to clipboard operation
PyDrive2 copied to clipboard

Is there any way to download a particular version of a Google Drive file? (from file history)

Open abubelinha opened this issue 3 years ago • 1 comments

Not sure if there could be two different branches of this question (I guess both they might work in a different way):

  • Google Docs, Google Presentations or Google Sheets (at least) do store history of the file changes and permit to go back in time (user can select one old version and get back to it). Would it be possible to download a non-last version of a Google sheet using PyDrive ?

  • Google Drive permits to keep versions of user-uploaded files (i.e., a PDF or image file, which you can reupload modified and let Drive store multiple-versions or only the last one). Would it be possible to download an archived version (not just the last one) using PyDrive ?

https://developers.google.com/drive/api/v3/change-overview https://developers.google.com/drive/api/v3/manage-revisions

Some other Python projects which might benefit from this: https://github.com/burnash/gspread/issues/294

abubelinha avatar May 01 '21 12:05 abubelinha

@abubelinha I doubt there is a way. We would need to add support for Revisions. I think it should be similar to the way Permissions are listed here. After that the whole file object should be adjusted in certain places to accept revisionId along with id.

shcheklein avatar May 01 '21 20:05 shcheklein