testa abalez testa abalez - 1 year ago 281
Swift Question

Google Drive API v3 for iOS : How to get thumbnails?

In the past, with Google Drive API v2, I could easily get thumbnails for pictures or videos with the property


But now, with the API v3 which I currently use with Swift, the
of the files I get from Google Drive is nil, so what can I do to get thumbnails of images and videos stored in the user's Google Drive. I need to display theses in my iOS app.

Answer Source

Make sure to specify thumbnailLink in fields, such as

let query = GTLQueryDrive.queryForFilesList()
query.fields = "files(id, name, thumbnailLink)"

then you can access the property thumbnailLink for images and videos

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download