I want to get a thumbnail that google drive creates for the stored pdf files. With this function I am listing all the files:
listFiles: function (folderId, onData, onError) {
drive.files.list({
auth: jwtClient,
q: "'" + folderId + "' in parents"
}, function (err, res) {
console.log(res.files)
}
});
The output of a console log for each file looks like this:
{
kind: 'drive#file',
id: '0BapkdhpPsqtgf01YbEJRRlhuaVUf',
name: 'file-name.pdf',
mimeType: 'application/pdf'
}
When I check the google's documentation, it says that metadata of a file should contain all of these properties: https://developers.google.com/drive/v3/reference/files
and there I found: contentHints.thumbnail.image How do I access it?