Reputation: 41
I want to make a preview link to the Google Drive file in my application. A file could be anything eg. Google Docs file, image, pdf etc. I'm using Google Drive API (Files.get).
I found out that thumbnailLink shows images and pdf in "preview" window as an image, but is not enough for pdf files, I want to scroll down the file.
I have used this link https://drive.google.com/file/d/{fileid}/preview in my code and it works with pdf and images. And it also shows my Google Docs content (the first version of it). But when I update a Google Docs file, links like https://drive.google.com/file/d/{fileid}/preview doesn't show updated content, it only shows the old content. When I click the preview link, I see a quick flash of the updated content and then it shows the old content. I would like to have the updated content.
Is it possible to use that preview link with Google Docs file too? Or should I always use EmbedLink with Google Docs file? It still works well.
I'm just wondering what is the right way to do it? And scrolling is the thing, I don't want just images of the files.
Upvotes: 2
Views: 1087
Reputation: 12673
The /preview
URL is not a part of the API and not supported or guaranteed to work in the future. We recommend you only use the links returned by the API, such as the embedLink
you mentioned.
Upvotes: 1