0

I tried to get list images of my google drive. My code in Java:

FileList mockupList = service.files().list()
                        .setPageSize(100)
                        .setQ("mimeType='image/jpeg' and '" + optionFolderID + "' in parents")
                        .setFields("nextPageToken, files(id, name, thumbnailLink, createdTime, hasThumbnail)")
                        .execute();

But the response did not contain thumbnailLink. I changed scopes: DriveScopes.DRIVE (full access) but not work. Please give me a solution. Thanks!

P/s: if i tried in https://developers.google.com/drive/api/v3/reference/files/list, it's work well. But in my java client is not.

TK GG
  • 1
  • What fields does your response currently contain? – Rafa Guillermo Mar 18 '20 at 09:46
  • @RafaGuillermo in the request: files(id, name, thumbnailLink, createdTime, hasThumbnail) but in response i only get: id, name, createdTime, hasThumbnail. Google did not display thumbnailLink field – TK GG Mar 19 '20 at 05:10
  • Does this answer your question? [Unable to get thumbnail using Google Drive API](https://stackoverflow.com/questions/23548871/unable-to-get-thumbnail-using-google-drive-api) – Rafa Guillermo Mar 24 '20 at 12:46
  • @RafaGuillermo not working. My solution is download to a temp folder and resize in local pc. I think gg drive does not support from v3. – TK GG Apr 03 '20 at 07:21

0 Answers0