Open
Description
While trying to list image files in a google drive folder using v3 api:
- When drive folder is empty, it works fine and return None
- When there is an existing image in the folder, api starts to return images from the trash
For a desktop app using Python, following code is used to list files. The behavior remains same even when trashed is used instead of explicitlyTrashed.
q = "'{}' in parents and explicitlyTrashed=false and mimeType='image/png'".format(folder_id)
files = service.files().list(q=q,
spaces='drive',
fields='nextPageToken, '
'files(id, name)',
pageToken=page_token).execute()