user1288043
user1288043

Reputation: 321

Google drive files preview api

I want to display previews of the files (images, videos, docs, xl, ppt, pdf) stored on the google drive on a webpage. Which api or library should I use?

Upvotes: 6

Views: 6274

Answers (3)

岡本孝志
岡本孝志

Reputation: 1

you can view it with

url =`https://lh3.googleusercontent.com/d/${fileId}=w500?authuser=0`

Upvotes: 0

David
David

Reputation: 302

with the google drive api, you can get the file's metadata via the https://www.googleapis.com/drive/v2/files/YourFileID request. Then parse the JSON response and use the thumbnailLink in the file info

Upvotes: 1

Ali Afshar
Ali Afshar

Reputation: 41663

You can use the Documents List API, displaying thumbnails as a preview. Or you could download/export the files and generate the preview yourself.

Upvotes: 0

Related Questions