Skip to content

Drive List returns list of files from trash  #2199

Open
@addiercv

Description

@addiercv

While trying to list image files in a google drive folder using v3 api:

  1. When drive folder is empty, it works fine and return None
  2. 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() 

Metadata

Metadata

Assignees

No one assigned

    Labels

    api: driveIssues related to the Drive API API.externalThis issue is blocked on a bug with the actual product.type: questionRequest for information or clarification. Not an issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions