jdmf
jdmf

Reputation: 96

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!

Upvotes: 6

Views: 1042

Answers (2)

csharpwinphonexaml
csharpwinphonexaml

Reputation: 3683

I tried a bit and used this link:

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

in the items you have the links to the item.

I have also tried the
https://developers.google.com/drive/v2/reference/revisions/get and it works.

It returns the downloadUrl for the revision.

Upvotes: 0

Claudio Cherubino
Claudio Cherubino

Reputation: 15004

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.

Upvotes: 1

Related Questions