2

My web application queries the users Google Drive repository using the SDK and then presents the list of files to the user, I would like to take advantage of the thumbnail and display the files thumbnail image.

If the user is only logged into one Google Account the thumbnail images appear as expected. However, if the user is logged into multiple user accounts at one time (which we always are), the images are broken. By manually copying the thumbnail image link and enter it into the browser, you must first select the account you would like to access the link as.

From inspecting the thumbnail link there is no Google Apps domain information, however when inspecting the alternativeLink (which lets you open the file as a Google doc when applicable) this link does have Google Apps domain specific information and does not require you to select the account that it should be accessed as.

Is there something I'm missing? Or is this a defect?

4

1 に答える 1

2

It is strange, I just tested and things work differently on my 2 accounts:

for regular files (PDF, images...) the image is always public and always visible, even if I am not logged into any account.

For native Google docs document I only see the image if I am signed in yes. When multi-logged-in I do not get the account chooser though, it just always fails for the non-gmail account. PS: the workaround to display the image, you can append the URL parameter: &authuser=1 (or 0) depending on the order you signed in which is why it's not usable programmatically.

Also there is no way to use OAuth to display the thumbnail, I get a 401 erro when doing that.

IMO this is a bug, thumbnails should in theory always be public. I have filed a bug to our engineering team and I'll keep you updated.

于 2012-08-23T00:16:15.787 に答える