Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you get the content of a file revision in Google Drive SDK?

I'm attempting to get revision histories for google drive (actually, docs) files using the Google Drive .NET SDK. I can get the metadata for a list of revisions for a given file just fine, but it appears that for any given Revision, the DownLoadUrl field is always null, and the ExportLinks all point back to the most recent complete version of the doc (i.e., not to the revision indicated by the metadata).

Any suggestions? Is this just how it works? I've noticed that the return value in the API explorer for the Revision object behaves in the same way.

https://developers.google.com/drive/v2/reference/revisions/get

Thanks in advance!

like image 728
jdmf Avatar asked Aug 28 '12 03:08

jdmf


People also ask

Does Google Drive have revision history?

Note: You need Owner or Editor access to see the version history. In Drive, open your file. See version history. Click a timestamp to see a previous version of the file.


1 Answers

The downloadUrl field is only populated on files with content stored in Drive and not for Google native formats.

Please edit your question to add the file metadata if the API is still not behaving as expected.

like image 188
Claudio Cherubino Avatar answered Sep 28 '22 09:09

Claudio Cherubino